Sponsored Content
Operating Systems Solaris Send file attachement in mail Post 302878555 by MadeInGermany on Friday 6th of December 2013 05:56:40 PM
Old 12-06-2013
Solaris mailx does not have -a option.
But the following seems to work
Code:
MAILFORMAT="Please do not replay this mail.This mail is auto generated."
FILENAME=file.csv

mailx -r autoreplay@gmail.com -s "status" xyz@gmail.com << _EOM
$MAILFORMAT

`uuencode $FILENAME $FILENAME`
_EOM

This User Gave Thanks to MadeInGermany For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Send a mail with a subject and an attachement

Dear All: I want to send a message to a list of people with a subject and an attachement, currently I am using the following command into a shell script: uuencode $FILENAME.gz $FILENAME.gz | mail john.kennedy@mycompany.com m.m@mycompany.com With this command I can send the message for a... (1 Reply)
Discussion started by: josecollantes
1 Replies

2. UNIX for Dummies Questions & Answers

Send a mail with an attachement of a file

I wanted to try sending a mail with an attachement at command prompt in unix. Some one please advise that how we can do it ? Thanks, :) (2 Replies)
Discussion started by: gaddeg
2 Replies

3. Shell Programming and Scripting

How to send Mail with Attachement

Hi Can somebody help me in wirting shell script in the following way.Desperately i have poseted this.. 1.How can I connect to Oracle(Sqlplus) from UNIX. 2.After connecting to it I have to execute an oracle proceudure.. 3.Execution of the procedure will give some set of rows.. 4.The set of... (6 Replies)
Discussion started by: chgopi
6 Replies

4. UNIX for Dummies Questions & Answers

Send email with attachement-Getting connection refused by domain

Hi all, I am a newbie to unix. I need to send an email with an attachment in unix to some id like abc@some_company.com Code i have used is ------------Code--------------------------- #!/bin/ksh set -x #set -n #cript: unix_mail_withattachments.ksh # Aurthor: Ravin Maharaj #... (1 Reply)
Discussion started by: samuelc
1 Replies

5. Shell Programming and Scripting

How to send a mail with attachement as well as message Body..?

Hi all, i am working with CSH, i want to know that how to send a mail in UNIX shell script (CSH) with attachment as well as message body. i know that how to send a mail with attachment and message body. but i want know both things in a single mail Suggession would be appreciate. ... (1 Reply)
Discussion started by: psiva_arul
1 Replies

6. Shell Programming and Scripting

query about Attachement in mail

Hi All, I have general query that ...in my script i used uuencode option like below. cd /location (cat test.txt uuencode test.csv test.csv ) | mail -s "test mail" "mail_id" but whenever i run the above command its giving error like below ./testscript.sh: uuencode not found: ... (1 Reply)
Discussion started by: Shahul
1 Replies

7. Shell Programming and Scripting

attachement through mail command

Can't attach text files to 'mail' command. I dont have mutt or mailx to use on my server. so i have to use mail command any help would be great. Regards, Kiran (1 Reply)
Discussion started by: dddkiran
1 Replies

8. Shell Programming and Scripting

sending attachement in mail

Hi , I am using the below code to send mail through a script which run as a cron job. msgdate=`date +"%a, %e %Y %T %z"` daemail=$(cat <<! From: $from To: $emailtarget Subject: $subject Mime-Version: 1.0 Content-Type: multipart/mixed; Content-Disposition: inline $priority $CONTENT !)... (2 Replies)
Discussion started by: ahamed
2 Replies

9. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies
mailfrom(1)						      General Commands Manual						       mailfrom(1)

NAME
mailfrom - summarize mail folders by subject and sender SYNOPSIS
status] [folder|username]... DESCRIPTION
The command reads one or more mail folders and outputs one line per message in the form: from [subject] where from is the name of the person the message is from, and subject is the subject of the message, if present. If determines that the message is from you, the from portion will read where user is the user the message was sent to. This happens when you receive a copy of a letter you sent. The default folder is your incoming mailbox, See the Operands subsection below. Options recognizes the following options: Print a brief help message summarizing the options. Number the messages using the same numbering scheme used by Very quiet mode. Only error messages are produced. This option is useful in shell scripts, where only the success or failure of the program is important, and output is not desired. Quiet mode. Output only a one-line summary for each mailbox or folder. Add a summary of the number of messages by message status in each mailbox or folder. To get the summary only, use this with the option. The summary has the form: If an item count, n, r, or u is zero, the line is omitted. Only display headers from messages with the given status. status can be one of or and are equivalent. The option can be repeated to print header information from more than one category, for example, only new and unread messages. The values can be abbreviated to their first letters. The default is all messages. Tidy mode. If the from field is long enough to displace the subject field from its normal start column, move the subject down onto the next line. Verbose mode. Print a descriptive header before listing the contents of each mailbox or folder. Operands recognizes the following optional operands: folder|username A file name or the name of a mail user on your system. You can use the format to specify a folder in your mail directory, defined by the string variable in your configuration file. searches for the value as a file name relative to your current directory. Then, if the file name is not an absolute path, it searches for the value relative to the incoming mailbox directory, The first file found is selected. You must have read access to the file. RETURN VALUE
returns the following values: Messages matching status are present. No messages matching status are present, but there are some messages. There are no messages at all. An error occurred. If multiple mailboxes or folders are specified, the exit status only applies to the last one examined. This can be used in scripts to determine what kind of mail a user has. EXAMPLES
Display header information from all the messages in your mailbox. Display header information from all new messages in your mailbox. Assuming you have the proper file permissions to read mail, print out header information from all new and unread messages in incoming mail- box. Print only a summary of how many new, unread, and read messages are in your incoming mailbox. AUTHOR
was developed by HP. FILES
Your configuration file. Directory of incoming mailboxes. SEE ALSO
elm(1), mail(1), mailx(1), readmail(1). mailfrom(1)
All times are GMT -4. The time now is 09:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy