![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to send an email with some body content and attachment | balireddy_77 | Shell Programming and Scripting | 2 | 1 Week Ago 03:33 AM |
| Script needed which will send a mail with attachment files | Mar1006 | Shell Programming and Scripting | 4 | 11-24-2007 04:59 AM |
| AIX send mail with HTML message body and a binary attachment | G-Man | UNIX for Dummies Questions & Answers | 4 | 03-22-2007 10:15 AM |
| Send an attachment and html text both in the same mail | stefan.yu | Shell Programming and Scripting | 4 | 10-26-2006 06:46 PM |
| Send Mail with attachment and a body | manojram | How do I send email? | 4 | 04-26-2004 08:53 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Command line/Script to send E-mail with HTML body and binary attachment
I apoligize for the cross-post but I'm not getting much in the way of help in the dummies forum:
I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements: 1. command line switch to specify file name containing message body in HTML format 2. command line switch to specify file name of a binary attachment 3. command line or input file to specify recipients (both to:, cc: and bcc 4. command line to specify From: address 5. command line to specify mail subject (subject text may include spaces) I've tried every combination redirecting and piping uuencode and mail/mailx you could ever come up with with no luck. The stumbling block is the HTML message body. Attaching a binary file to a text message body is a no brainer but I have to have the message body in HTML because we are using formatted tables. Any help would be greatly appreciated. Thanks. |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks. Tested with it after modifying for AIX uuencode syntax. Didn't work but we are really close.
This particular html document is actually a "Save As" from a Microsoft Word document and it appears that Microsoft puts some additional HTML kung-fu in the header that that doesn't fully comply with the RFC. Any chance you can give me the correct mime syntax to use a Microsoft Word document for the message body instead of the HTML? BTW, the correct AIX uuencode syntax for base 64 is: uuencode -m input_file output_file |
|
|||
|
Try if the below works for u......
################################## TIMESTAMP=`date +"%m-%d"` mailx -s "$TIMESTAMP - Hi" abc@att.com << EOF `/usr/bin/uuencode /tmp/Test.pdf Test.pdf` Hi, See if u able to catch file.... EOF ##################################\ Cheers ArB |
|||
| Google UNIX.COM |
| Tags |
| mailx, mailx attachment |
| Thread Tools | |
| Display Modes | |
|
|