muquit / mailsend

A program to send mail via SMTP from command line
Other
294 stars 68 forks source link

Combine html text #105

Open oriye opened 7 years ago

oriye commented 7 years ago

Hi,

i want to combine a html text. i run this command:

mailsend -t mailto@gmail.com -f mailfrom@gmail.com -name NAME -ssl -port 465 -auth -smtp smtp.gmail.com -sub "Hello" -content-type "text/html" -M "<b>hello world</b>" -user user@gmail.com -pass password

and this email message appears:

image

how i remove --h1ffccko3plpiZ9k Content-Type: text/plain; charset=utf-8 Content-Disposition: inline and -h1ffccko3plpiZ9k--

??

i mean only "hello world" will appears in the text message.

Thanks.

flado74 commented 7 years ago

Hi I have the same problem. How can one solve it? Thanks

muquit commented 7 years ago

Use -mime-type instead of -content-type. They are not the same thing. -content-type is used for embedding images in HTML. There are bunch of test_embed scripts in test/ directory to show how to embed images in HTML.

Thanks.

flado74 commented 7 years ago

Thanks, That helped. Also realized that the order of the parameters is very important. Was trying to send a html coded email togheter with an attachment (not inline) and could not succeed until I changed the order of the params. Not sure what in my previous order was wrong, but now it works! Mailsend is a great little tool, but some more documentation would be great! Thanks :-)