mailx / sendmail command
Posted in 2006
Topics: Platform-Specific Issues
Can anyone provide the command how to send a text file as a attachment with a proper subject using mailx or sendmail command in UNIX. Note: I am using HP-UX OS. The file send should be the attachment, not in the message body. In addition, I need to put in the mail subject as well. -- Message posted via DBMonster.com http://www.dbmonster.com/Uwe/Forums.aspx/informix/200607/1
On 7/16/06, yy4 via DBMonster.com <u21544@uwe.iiug.org> wrote: > > Can anyone provide the command how to send a text file as a attachment > with a > proper subject using mailx or sendmail command in UNIX. > > Note: I am using HP-UX OS. The file send should be the attachment, not in > the > message body. In addition, I need to put in the mail subject as well. Unix questions on the Informix list? Well, sometimes it'll work. I suggest asking on a Unix list instead. Offhand, I certainly don't know. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
( cat your_text_msg ; uuencode attachment1 attachment2 ) | mailx -s 'Email_Subject' the_receiver_email_id@the_domain.com <mailto:the_receiver_email_id@the_domain.com> yy4 via DBMonster.com wrote: >Can anyone provide the command how to send a text file as a attachment with a >proper subject using mailx or sendmail command in UNIX. > >Note: I am using HP-UX OS. The file send should be the attachment, not in the >message body. In addition, I need to put in the mail subject as well. > > >
Yep... we do it all the time... it's a pain in the @!@#$%^!!^^!@#$ However, that's the deliver option the customer wants. You have several options. It depends on whether you want to include a message in the body as well. (cat message.txt ; uuencode ${TMP}/attachment attach.txt ) | mailx -m -s "Subject of message" < ${email_addresses} Conditionals: You must use proper email addresses for which you have host resolution (or DNS enabled), the message.txt and the ${TMP}/attachment must go through the UNIX to DOS conversion, and the whole thing should be tested at the recipients side. I like uuencode. However, I'm a dinosaur. Oh, and I LOVE HP-UX! You must have a mail client at the other end with the proper configuration to translate uuencode. Microsoft Outlook automatic defaults work well here if you echange, pop or ldap. However, if the destination is a web mail client, you'll get gobblety gook. Rob -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of yy4 via DBMonster.com Sent: Monday, July 17, 2006 2:55 AM To: informix-list@iiug.org Subject: mailx / sendmail command Can anyone provide the command how to send a text file as a attachment with a proper subject using mailx or sendmail command in UNIX. Note: I am using HP-UX OS. The file send should be the attachment, not in the message body. In addition, I need to put in the mail subject as well. -- Message posted via DBMonster.com http://www.dbmonster.com/Uwe/Forums.aspx/informix/200607/1 _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list