Sponsored Content
Top Forums Shell Programming and Scripting Sending email with text & attachment using mailx Post 70248 by zz_xm on Tuesday 26th of April 2005 10:23:20 PM
Old 04-26-2005
Excelent:-)

I try it ok in FreeBSD:-)
1.)/usr/bin/echo "Email text\nNew line\nAnother new line" >x

2.) uuencode sourcefile.txt sourcefile.txt | cat x - | mailx -s "Email subject" "recipient@company.com"

Thanks a lot;
Before you post,I can do only post content or post attechment with command line;can't bind them :-(
cat content.txt | mailx -s "Email subject" "recipient@company.com"
or
cat attechment.tar.gz | uuencode attechmetn.tar.gz | mailx -s "Email subject"
"recipient@company.com"
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

email attachment, with a message using mailx

Hi, I am trying to include a message along with an attachment with an email using mailx on AIX. uuencode Test.dat Test.dat| mailx -s 'Testing' mymail@yahoo.com < MESGFILE This only gives me the contents of MESGFILE as my message. If I remove the < FILE I recieve the attachment. What... (4 Replies)
Discussion started by: edog
4 Replies

2. Shell Programming and Scripting

Problem with mailx command when sending attachment.

Hi, I have tried to sent a mail with body and attachment. But the shell script got hanging while executing that command. The command is "(cat body;uuencode att1.csv)|mailx -s "Production Monitoring Report(Unix Side)" milton.yesusundaram@patni.com" where body is a file having a single line.... (2 Replies)
Discussion started by: miltony
2 Replies

3. Shell Programming and Scripting

Problem while sending message and attachment with mailx

Hi All, I am trying to send a mail with an attachment and message. Following command I am using. (cat <messagefile> ; uuencode <attachmentfile> <attachmentfile>)|mailx -s"Subject" dave@email.com In the received mail, message body is appearing fine. But attachment is not coming. Rather... (2 Replies)
Discussion started by: nihar.dutta
2 Replies

4. Shell Programming and Scripting

mailx attachment sending large file

Hi I want to sent attachment file which is 400mb size.(single file, not tar file) is there any way that these kind of large files can be divided into small sizes and sent as attachments thanks with anticipation (3 Replies)
Discussion started by: karthikn7974
3 Replies

5. Shell Programming and Scripting

sending an attachment through email

As a part of requirement I need to send out mails with attachment from UNIX. I have to take query the Oracle DB and send the result of the query in an attachment through mail. I use the following script for the same. #!/bin/csh #!/bin/bash #!/bin/ksh ATTFILE=/folder1/test.xls cd... (1 Reply)
Discussion started by: Sgiri1
1 Replies

6. Shell Programming and Scripting

Sending Email with Attachment

Hi, I want to send an email with multiple attachment using uuencode and mail command. I am able to send with one attachment Ex:uuencode abc.txt abc.txt | mail test@test.com -s "Test3" Can anyone reply with syntax. Regards BS (3 Replies)
Discussion started by: balajiora
3 Replies

7. Shell Programming and Scripting

Not able to attach text in body of email while sending mail with attachment

Hi, We have been trying to send mail with attachment and it is going fine, but when we try to attach a text to the body of the email, we find that the mail is going fine with the body text but the attachment is not going through. We are using ksh. The command that is successfull without the... (6 Replies)
Discussion started by: jmathew99
6 Replies

8. Shell Programming and Scripting

sending an email with attachment

Hi, Please help me in sending an e-mail with attachment through unix mailx command is not present in our unix box. (4 Replies)
Discussion started by: dudd9
4 Replies

9. Shell Programming and Scripting

mailx not sending excel attachment properly

Hi, I am trying to send email with attachment using mailx command. I am using the folowing command: uuencode XX_HWSW_BUYERWISE_88963631_1.xls XX_HWSW_BUYERWISE_88963631_1.xls | mailx -s "Test Mail as Attachment" oracleams@xyz.com I get the email in the inbox. However, when I try to open the... (5 Replies)
Discussion started by: asp_julius
5 Replies

10. UNIX for Beginners Questions & Answers

Need help sending attachment via mailx

Hello, I am new to the Unix thing, and I am having trouble sending attachments via shell client putty through mailx. The command I use is $ mailx -s "Subject" user@blah.com < attachment.txt but everytime I do that it would say Cannot open attachment.txt I have the file save to my computer... (5 Replies)
Discussion started by: mrobin20
5 Replies
Paranoid::Log::Email(3pm)				User Contributed Perl Documentation				 Paranoid::Log::Email(3pm)

NAME
Paranoid::Log::Email - Log Facility Email VERSION
$Id: Email.pm,v 0.82 2010/04/15 23:23:28 acorliss Exp $ SYNOPSIS
use Paranoid::Log; enableFacility('crit-alert', 'email', 'debug', '+', $mailhost, $recipient); enableFacility('crit-alert', 'email', 'debug', '+', $mailhost, [ @recipients ]); enableFacility('crit-alert', 'email', 'debug', '+', $mailhost, $recipient, $sender, $subject); DESCRIPTION
This module implements an e-mail transport for messages sent to the logger. It supports one or more recipients as well as overriding the sender address and subject line. It also supports connecting to a remote mail server. DEPENDENCIES
o Net::SMTP o Net::Domain o Paranoid::Debug SUBROUTINES
/METHODS NOTE: Given that this module is not intended to be used directly nothing is exported. init log remove dump SEE ALSO
o Paranoid::Log BUGS AND LIMITATIONS
No validation of any information, be it the mail server, recipient, or anything else is done until a message actually needs to be sent. Because of this you may have no warning of any misconfigurations just by enabling the facility. AUTHOR
Arthur Corliss (corliss@digitalmages.com) LICENSE AND COPYRIGHT
This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information. (c) 2005, Arthur Corliss (corliss@digitalmages.com) perl v5.14.2 2010-04-15 Paranoid::Log::Email(3pm)
All times are GMT -4. The time now is 09:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy