muquit / mailsend

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

Can't get attachments to work #160

Open bcosell opened 2 years ago

bcosell commented 2 years ago

in my mailsend command line, it ends with

-msg-body "d:/perl/nplmail.20528.txt" -attach "d:/perl/nplmailattach.20528.txt" -v -show-attach

The files for the attachment is there [I've double checked] but nothing is attached to my message [and that's confirmed by the absence of any attachment in the -v log info] What am I doing wrong?? THANKS

bcosell commented 2 years ago

Just to clarify in case I made some other error in the command line I've tried:

mailsend.exe -ct 600 -read-timeout 600 -smtp -ssl -port 465 -auth -domain <> +bc -f nobody@domain.com -mime-type "text/plain" -name "Name" -user -pass "PW" -to bernie@fantasyfarm.com -sub "attachment test" -msg-body "message.txt" -v -aname "attachment" -attach "attachment.txt" -show-attach

And the message comes through without an attachment (-v printout says the same thing). This all with mailsend.19

muquit commented 2 years ago

If -msg-body is used, only one file can be "included", all other attachments will be ignored. It is mentioned in FAQ #1. Including a file as body and attachments can not be mixed. "include" means it just adds the file as body like old school mail without any MIME type. You can try sending all files as attachments and first one as -attach "file,mime-type,i". Most mail readers will show it as body - also mentioned in FAQ# 1. Also you might have better luck with mailsend-go

Thanks.

bcosell commented 2 years ago

Thanks for the info. I didn't see that there were FAQs. But I've taken your advice and just downloaded mailsend-go. THANKS!