Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I want to send an attachment in a mail, in a unix scriptmail -s "subject" user@outlook
How can i attach a file in the e-mail.
Any advice will be greatly apreciatted.

Thanks for the reply
It's not exatcty what I need, I don't want the file in the text of the e-mail (in the body), I want the file as a attached file in the e-mail. It's posible that I will need to atachh more tha one file.
Thanks

Set your content type to multipart/mixed
Define the boundary
Encode the files
Start the next boundary, define content-type, charset & encoding
Attach encoded file
Wash, rinse, repeat.
E-mails are always plaintext - it's a pain but you can do the above, here's an example in php:
http://www.webcheatsheet.com/php/se...Although you'll need a little more than that if you're transfering binaries.

man mail
... would be the first thing to try. The internet does not know what OS you are running, it will all kind of options you cannot use on your copy

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |