mailsend icon indicating copy to clipboard operation
mailsend copied to clipboard

problem with mail body and attachment

Open RafalKarol opened this issue 8 years ago • 10 comments

I'd like to send mail with mailbody and attachment, mailbody is a text file, and attachment is a pdf file, I tried many combinations, but it doesn't work. I have only body mail with many characters, not attachment as pdf file

mailsend1.19 -to [email protected] -from [email protected] -port 25 -smtp smtp.xx.com -sub "Test" +cc +bc -user [email protected] -pass xxx -mime-type "text/plain" -enc-type "none" -disposition "inline" -attach mailbody.txt -mime-type "application/pdf" -enc-type "base64" -disposition "attachment" -attach test.pdf

Below a part of mail body: "??????,

Regards, Rafal--1KQbRgRQPNYVwdML Content-Type: application/pdf; charset=utf-8 Content-Disposition: attachment; filename="test.pdf" Content-Transfer-Encoding: base64

JVBERi0xLjQKJcfsj6IKNCAwIG9iago8PC9MaW5lYXJpemVkIDEvTCAxMjk2OC9IWyAxMDM3"_

RafalKarol avatar Apr 30 '17 13:04 RafalKarol

Message body and attachments can not be mixed. You can attach the text file as inline and most mail readers will probably display it inline. Please have a look at FAQ# 1. Thanks.

muquit avatar Apr 30 '17 15:04 muquit

please, look at my example, I don't use parameter -M, I have two attachments, and I'd like the text file will be inline, and pdf file will be as attachment, and it doesn't work, these two attachments are inline

RafalKarol avatar Apr 30 '17 16:04 RafalKarol

What platform are you on? I suspect it could be the bug #108, which is fixed in the develop branch. If you are on Linux/Unix you can pull the branch and try it. I did not get a chance to compile the fix on Windows yet.

Thanks

muquit avatar Apr 30 '17 17:04 muquit

windows, so I have to wait, thank you for the information,

RafalKarol avatar Apr 30 '17 17:04 RafalKarol

I uploaded v1.20b for Windows in releases section. However, I could not reproduce the issue even with v1.19 from Windows 10 with gmail. Text attachment shows up inline. For text file, with -disposition inline, I tried -enc-type "none" -cs "utf-8", worked fine. Also tried -enc-type "base64", worked fine as well.

muquit avatar Apr 30 '17 19:04 muquit

I tested with v1.20b for Windows and it works fine. I don't have problem like with v1.19. Thank you very much for the help. Version 1,20b solved my problems.

RafalKarol avatar May 03 '17 21:05 RafalKarol

MailSend v 1.20b Windows 10

Does not work with both -msg-body and -attach. I thought 1.20b was to fix this.

mailsend -v -f [email protected] -smtp smtp.mysite.com -port 587 -t [email protected] -sub "This is the Subject" -name "from Art" -rt [email protected] -auth -user [email protected] -pass mypwd -msg-body body.txt -attach "test.pdf"

ArtZL avatar Dec 07 '17 03:12 ArtZL

I have same issue i am getting only BODY content and attachment got missed. I am using cygwin to send mail. Any one got resolve this issue

mailsend -v -f [email protected] -smtp smtp.mysite.com -t [email protected] -sub "This is the Subject" -msg-body "body.txt" -attach "sample.txt"

comeback2000 avatar Feb 07 '18 15:02 comeback2000

I have the same issue.

Either the parameter -msg-body OR -attach works. Not both together.

Is there a Workaround?

q2956 avatar Jan 05 '19 11:01 q2956

It’s the “disposition settings”. Took me months to figure this out. And the order of the parameters might matter.

mailsend -f "[email protected]" -t [email protected] -rt [email protected] -starttls -port 587 -auth-plain -smtp mail.smtpServer.com -user [email protected] -pass "Password" -sub "Testing Email" -disposition attachment -attach "attachment.pdf" -disposition inline -attach "body.txt" -log "C:\temp\log.txt"

      Art Lieberman

From: q2956 Sent: Saturday, January 5, 2019 6:08 AM To: muquit/mailsend Cc: ArtZL ; Comment Subject: Re: [muquit/mailsend] problem with mail body and attachment (#111)

I have the same issue.

Either the parameter -msg-body OR -attach works. Not both together.

Is there a Workaround?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ArtZL avatar Jan 06 '19 14:01 ArtZL