This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Sending a mail with attachement....

Old posts that have not been replied to for several years.
Locked
F
Freez
Voice
Posts: 10
Joined: Tue Aug 24, 2004 2:01 pm

Sending a mail with attachement....

Post by Freez »

Hi!

I have write an tcl script that create an html file. Now a would like to mail that file. This is my code

Code: Select all

exec mail -s $subject $to_address < $attachement
It works but the contect of $attachement would be the boddy of the mail. How can i added it as an attachement?

Than you!

Sorry for me bad english :wink:
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: Sending a mail with attachement....

Post by user »

Freez wrote:

Code: Select all

exec mail -s $subject $to_address < $attachement
It works but the contect of $attachement would be the boddy of the mail. How can i added it as an attachement?
1) pick some encoding (MIME/UUEncode)
2) encode the attachment
3) add the appropriate header(s) and the encoded string to the body of the mail.
4) done.
Have you ever read "The Manual"?
Locked