muquit / mailsend

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

Message body doesn't show in gmail #75

Open rikhtehgaran opened 9 years ago

rikhtehgaran commented 9 years ago

hi i would like to show an html file as message body in previous version i use this command to do that:

mailsend -from "newsletter@mysite.com" -name "iiiWe.com" -smtp "mail.mysite.com" -auth-login -port "25" -user "newsletter@mysite.com" -pass "*****" -sub "MySubject" -log mail.log -d "mysite.com" -rt "mailsupport@mysite.com" -attach "file.html,text/html,i,file.txt,none,none,i" -cs "UTF-8" -list "list/l1.txt" 2>&1 >/dev/null

now it returns this error: Error: Invalid string specified with -a "file.html,text/html,i,file.txt,none,none,i"

i would like to send my email with gmail and when i use this command:

mailsend -ssl -from "myemail@gmail.com" -name "Something" -smtp "smtp.gmail.com" -auth-login -port "465" -user "myemail@gmail.com" -pass "**" -sub "MySubject" -log mail.log -rt "myemail@gmail.com" -msg-body "file.html" -enc-type "8bit" -cs "UTF-8" -list "list/l1.txt" Mail sent successfully

but in gmail i have something like this: http://www.axgig.com/images/31625861367155646184.jpg

Thanks mailsend Version: @(#) mailsend v1.17b15 Compiled with OpenSSL: OpenSSL 1.0.1e 11 Feb 2013

muquit commented 9 years ago

For first command, use multiple -attach if you have more than one attachment. Example: -attach "file.html" -attach "file.txt". Before each -attach you can specify its own mime-type, encoding type, cs etc.

Specify mime type before -msg-body. example: -mime-type "text/html" -msg-body "file.html"

Thanks.