muquit / mailsend

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

-attachment bug #145

Open azev opened 5 years ago

azev commented 5 years ago

When using -attachment, althouth the file is attached (seen on email source), is not shown not as inline neither as attachment in the email.

To fix this problem I have to attach the file twice. It almost doubles the sent email size.

amosharper commented 5 years ago

@azev, there's no -attachment argument in 1.19. Does it work using -attach when you supply the MIME type and attachment type (inline/attached)? Example of a very explicit command that works for me:

mailsend -t some.guy@mydomain.com -f approved.address@mydomain.com -attach "c:\somewhere\attachment.png,image/png,a" -sub "This Is A Test" -attach "c:\somewhere\messagebody.htm,text/html,i"

azev commented 5 years ago

mailsend -to someone@somewhere.com -from me@somewhere.com -ssl -auth -port 465 -smtp smtp.somewhere.com -user me@somewhere.com -pass "****" -sub "Test email" -attach "d:\file1.rar",mime_type,a -attach "d:\file2.pdf",mime_type,a

This command will send the email, however the first attachment won't be properly attached, whichever is the first file1.rar or file2.pdf, the first is never attached.

jax-404 commented 5 years ago

Try this:

mailsend -to someone@somewhere.com -from me@somewhere.com -ssl -auth -port 465 -smtp smtp.somewhere.com -user me@somewhere.com -pass "****" -sub "Test email" -mime-type "application/*" -disposition attachment -attach "d:\file1.rar" -attach "d:\file2.pdf"