![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading a mailbox and sending new messages to a text file | rsw626 | Shell Programming and Scripting | 1 | 04-17-2008 10:35 AM |
| attaching the file to mail | javeed7 | Shell Programming and Scripting | 1 | 04-15-2008 08:15 AM |
| perl/mail - inserting file text in message body | thumper | Shell Programming and Scripting | 2 | 01-28-2008 11:29 AM |
| sending mails with attachment and also some text in mail body | guptan | UNIX for Advanced & Expert Users | 7 | 05-25-2006 03:17 AM |
| sendmail message body buffer limit? | Optimus_P | UNIX for Dummies Questions & Answers | 3 | 10-04-2001 06:13 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Attaching file and sending text in body using sendmail command!!
Hello,
I need to send with text in the body and 2 files as attachments using sendmail command. i can send only one at a time either attachment or text in body of email. Can any one please help me how to get that? I will be great for any help. Thanks, Sparan |
| Forum Sponsor | ||
|
|
|
|||
|
sendmail by itself is a very simple mail submission agent. You need to give it a properly formatted mail message, and it will accept it into the queue, end of story.
Do you want to understand MIME, or just get this job done? In the latter case, there's a bunch of old MIME tools for this called metamail, but they are not very easy to use. Other people here have reported good success with using mutt from the command line for this. The following is just a quick demonstration of how to do it directly on the hot metal. Don't do this at home. Code:
cat <<'HERE' Subject: mail message Mime-version: 1.0 Content-type: multipart/related; boundary=foooooobar --foooooobar Body of message goes here --foooooobar Content-type: image/png; filename="icon.png" Content-transfer-encoding: base64 HERE mimencode file1 cat <<'HERE' --foooooobar Content-type: application/octet-stream; filename="worm.exe" Content-transfer-encoding: base64 HERE mimencode file2 echo echo '--foooooobar--' |
|||
| Google UNIX.COM |