RE: mailx / sendmail command
Posted in 2006
Topics: Platform-Specific Issues
Oops... take out the "<" syntax... use that only if you want to put your message body there... It should be: (cat message.txt ; uuencode ${TMP}/attachment attach.txt ) | mailx -m -s "Subject of message" ${email_addresses} Rob -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of Rob Konikoff Sent: Monday, July 17, 2006 7:17 AM To: 'yy4 via DBMonster.com'; informix-list@iiug.org Subject: RE: mailx / sendmail command 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 _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list
Thanks, for correcting that I was wondering about that. Rob Konikoff wrote: > Oops... take out the "<" syntax... use that only if you want to put your > message body there... > > It should be: > (cat message.txt ; uuencode ${TMP}/attachment attach.txt ) | mailx -m -s > "Subject of message" ${email_addresses} > > Rob > -----Original Message----- > From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] > On Behalf Of Rob Konikoff > Sent: Monday, July 17, 2006 7:17 AM > To: 'yy4 via DBMonster.com'; informix-list@iiug.org > Subject: RE: mailx / sendmail command > > 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 > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list