sending attachment with mail command

nitin.gizare at wipro.com nitin.gizare at wipro.com
Thu May 14 06:26:02 UTC 2009


HI

 

Just tried using but I not getting mails. Does this have any
configuration file in which we need to add mail relay server entry.?

 

 .

Rgds

Nitin

________________________________

From: Nitin Gizare (WT01 - Product Engineering Services) 
Sent: Thursday, May 14, 2009 11:49 AM
To: 'redhat-sysadmin-list at redhat.com'
Subject: RE: sending attachment with mail command

 

Thanks million.

 

Please log your queries/concerns/requests through
http://edasupport.wipro.com <http://edasupport.wipro.com/>  or send mail
to eda.support at wipro.com for quicker resolutions.

Rgds

Nitin

________________________________

From: redhat-sysadmin-list-bounces at redhat.com
[mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of Colin van
Niekerk
Sent: Thursday, May 14, 2009 11:45 AM
To: redhat-sysadmin-list at redhat.com
Subject: RE: sending attachment with mail command

 

Hi Nitin,

 

Must you use the mail command or can you just any command, mutt may be a
better option when dealing with attachments (its sorts out the MIME
types for you so you don't need to add extra stuff to your script in
order to ensure that the attachment is going to be readable on the other
side - more applicable when sending binary attachments through older
systems)

 

Unless it is not installed, you can use mutt as follows in scripts to
send a mail with an attachment:

 

echo "message body goes here" |mutt -s "subject goes here" -a
filename_with_full_path_goes_here email at address.goes.here

 

if you need it to go to many addresses (not limited to 3, this is an
example only), use:

echo "message body goes here" |mutt -s "subject goes here" -a
filename_with_full_path_goes_here
email1 at address.goes.here,email2 at address.goes.here,email3 at address.goes.he
re

 

if you need to attach multiple files, just add another -a argument:

echo "message body goes here" |mutt -s "subject goes here" -a
filename1_with_full_path_goes_here -a filename2_with_full_path_goes_here
-a filename3_with_full_path_goes_here email at address.goes.here

 

Cheers,

Colin

 

From: redhat-sysadmin-list-bounces at redhat.com
[mailto:redhat-sysadmin-list-bounces at redhat.com] On Behalf Of
nitin.gizare at wipro.com
Sent: 14 May 2009 04:39 AM
To: redhat-sysadmin-list at redhat.com
Subject: sending attachment with mail command

 

HI

 

I have requirement of sending server logs are attachment using mail
command.

Is this possible? if not can some body suggest any other method.

 

 

Rgds

Nitin

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/redhat-sysadmin-list/attachments/20090514/5dd3f13c/attachment.htm>


More information about the redhat-sysadmin-list mailing list