How to send e-mail with text and attachments by makemime and sendmail ?
Denys Vlasenko
vda.linux at googlemail.com
Mon Dec 20 04:13:17 UTC 2010
On Saturday 18 December 2010 13:12, Sertac TULLUK wrote:
> Dear Busybox owner, and Dear Mr Vlasenko;
>
> This is my third time to send below e-mail to busybox, but unfortunately I can't see my mails to get answered or appear on the archive list...
> Is there a problem with my mail system?
You subscribed in digest mode. Do you want your subscription
changed to ordinary one?
> ----- Original Message -----
> From: Sertac TULLUK
> To: busybox at busybox.net
> Cc: busybox-owner at busybox.net
> Sent: Wednesday, December 15, 2010 2:14 PM
> Subject: How to send e-mail with text and attachments by makemime and sendmail ?
>
> The problems are:
>
> 1) I can create some plain text formatted message, and send it by following command:
>
> ===> makemime -c "text/plain" -o /tmp/text.abc -a "From: SomeOne" -a "Subject: Hello" /home/mail.txt <===
> ===> cat /tmp/text.abc |sendmail -S serverip:587 -f sertac at xxx.com.tr -t stulluk at hotmail.com -t sertac at xxx.com.tr -au"sxxx at m.com.tr" -ap"xxxxxxx" <===
>
> However, when I receive the e-mail, the contents of the text message both appears on the body, and both as an attachment !!! Why ?
I wasn't able to reproduce it. I received the email with /home/mail.txt as its body,
with no attachments.
> 2) I can create some message with following commands, and send succesfully without any problem:
>
> ===> makemime -c "application/octet-stream" -o /tmp/attachments.abc -a "From: SomeOne" -a "Subject: Hello" /application/data/attach1 /application/data/attach2 /application/data/attach3 <===
> ===> cat /tmp/attachments.abc |sendmail -S serverip:587 -f sertac at xxx.com.tr -t stulluk at hotmail.com -t sertac at xxx.com.tr -au"sxxx at m.com.tr" -ap"xxxxxxx" <===
>
> Up to here, it is ok. But then, I want to add some text message to the body of my e-mail, so I do as follows:
>
> ===> makemime -c "text/plain" -o /tmp/text.abc /home/mail.txt <===
> ===> makemime -c "application/octet-stream" -o /tmp/attachments.abc /application/data/attach1 /application/data/attach2 /application/data/attach3 <===
> ===> makemime -m "multipart/alternative" -a "Content-Disposition: inline" -o /tmp/textfinal.abc /tmp/text.abc <===
> ===> makemime -j /tmp/attachments.abc -o /tmp/output.msg /tmp/text.abc <===
>
> In this point, size of attachments.abc is 934889bytes but the sizeof output.msg is only 742 bytes !!!
Busybox's rudimentary makemime doesn't handle -m or -j (yet?)
I will make it exit with error message on these optios,
to stop fooling users.
--
vda
More information about the busybox
mailing list