muquit / mailsend

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

-M one line messages #71

Open clan184 opened 9 years ago

clan184 commented 9 years ago

From my testing: if you create an email with three -M "text line" in V1.17b14 you get 3 lines in the body. In V1.17b15 you get the first line in the body and the other 2 are file attachments

muquit commented 9 years ago

mailsend v1.17b15 handles one line messages correctly. If you are using outlook, it's a bug/feature of outlook (mentioned in FAQ#1), it only displays first inline attachment as embedded. The messages will be displayed correctly in gmail, yahoo etc. If you look at the body of the email, you will see that the content-disposition of all one line messages is inline, Example:

--R9LDfhoJDxEaUbVN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
one line attachment 1
--R9LDfhoJDxEaUbVN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
one line attachment 2
--R9LDfhoJDxEaUbVN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
one line attachment 3
--R9LDfhoJDxEaUbVN

Thanks.

clan184 commented 9 years ago

Hi Sorry I'm getting confused here.

I'm sending both emails to myself from a command prompt so a bug in outlook would do the same to both emails wouldn't it ??

I renamed v1.17b14 to mailsendok.exe and left v1.17b15 as mailsend and used the identical email command apart from changing mailsend to mailsendok I've attached the .exe's I used, renamed to .zzz. I've just downloaded mailsend again to confirm which version is which. Using the one line message in the format

-M "Line 1" -M "Line 2" -M "Line 3"

mailsend (b14) returns

Message: Line 1 Mime type: text/plain Disposition: inline Encoding type: none

Message: Line 2 Mime type: text/plain Disposition: inline Encoding type: none

Message: Line 3 Mime type: text/plain Disposition: inline Encoding type: none

Mail sent successfully

emailsendok (b15) just returns

Mail sent successfully

Regards

Chris Aiken IT Department Fleet Factors Ltd. Phone: 01642 770 656 Fax: 01642 770 695 ( Please mark for my attention) Email: c.aiken@fleetfactors.co.uk Web: http://www.fleetfactors.co.ukblocked::http://www.fleetfactors.co.uk/


From: muquit [mailto:notifications@github.com] Sent: 05 February 2015 22:20 To: muquit/mailsend Cc: Chris Aiken Subject: Re: [mailsend] -M one line messages (#71) [Scanned By Sophos Pure Message]

mailsend v1.17b15 handles one line messages correctly. If you are using outlook, it's a bug/feature of outlook (mentioned in FAQ#1), it only displays first inline attachment as embedded. The messages will be displayed correctly in gmail, yahoo etc. If you look at the body of the email, you will see that the content-disposition of all one line messages is inline, Example:

--R9LDfhoJDxEaUbVN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline

one line attachment 1

--R9LDfhoJDxEaUbVN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline

one line attachment 2

--R9LDfhoJDxEaUbVN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline

one line attachment 3

--R9LDfhoJDxEaUbVN

Thanks.

Reply to this email directly or view it on GitHubhttps://github.com/muquit/mailsend/issues/71#issuecomment-73142385.

muquit commented 9 years ago

Sorry for the delay. mailsend v1.17b14 and v1.17b15 handles one line message very differently. In 1.17b14, all the one line messages were only one attachment, the lines were separated by a new line. However in 1.17b15, each one line message is an in-line attachment, each line can have its own character set and encoding type. That means different languages can be mixed if needed, for example one line can be in plain text, next line can be in HTML, another can be in chinese etc. It is mentioned in the ChangeLog under Dec-08-2013. Therefore, all the lines show up in outlook if sent by 1.17b14, but only first inline attachment shows up as body in outlook if sent by 1.17b15 (As mentioned in the FAQ as a feature/bug of outlook) .

Example: 3 lines sent by mailsend 1.17b14, attachment looks like:

--2JeF8nqWz0sDagDy
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
one line attachment 1
one line attachment 2
one line attachment 3
--2JeF8nqWz0sDagDy--

3 lines send by mailsend 1.17b15, attachments look like:

--R9LDfhoJDxEaUbVN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
one line attachment 1
--R9LDfhoJDxEaUbVN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
one line attachment 2
--R9LDfhoJDxEaUbVN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
one line attachment 3
--R9LDfhoJDxEaUbVN

Thanks.

clan184 commented 9 years ago

Hi I understand now. Thank you. Chris

Chris Aiken IT Department Fleet Factors Ltd. Phone: 01642 770 656 Fax: 01642 770 695 ( Please mark for my attention) Email: c.aiken@fleetfactors.co.uk Web: http://www.fleetfactors.co.ukblocked::http://www.fleetfactors.co.uk/


From: muquit [mailto:notifications@github.com] Sent: 12 February 2015 21:41 To: muquit/mailsend Cc: Chris Aiken Subject: Re: [mailsend] -M one line messages (#71) [Scanned By Sophos Pure Message]

Sorry for the delay. mailsend v1.17b14 and v1.17b15 handles one line message very differently. In 1.17b14, all the one line messages were only one attachment, the lines were separated by a new line. However in 1.17b15, each one line message is an in-line attachment, each line can have its own character set and encoding type. That means different languages can be mixed if needed, for example one line can be in plain text, next line can be in HTML, another can be in chinese etc. It is mentioned in the ChangeLog under Dec-08-2013. Therefore, all the lines show up in outlook if sent by 1.17b14, but only first inline attachment shows up as body in outlook if sent by 1.17b15 (As mentioned in the FAQ as a feature/bug of outlook) .

Example: 3 lines sent by mailsend 1.17b14, attachment looks like:

--2JeF8nqWz0sDagDy Content-Type: text/plain; charset=utf-8 Content-Disposition: inline

one line attachment 1 one line attachment 2 one line attachment 3

--2JeF8nqWz0sDagDy--

3 lines send by mailsend 1.17b15, attachments look like:

--R9LDfhoJDxEaUbVN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline

one line attachment 1

--R9LDfhoJDxEaUbVN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline

one line attachment 2

--R9LDfhoJDxEaUbVN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline

one line attachment 3

--R9LDfhoJDxEaUbVN

Thanks.

Reply to this email directly or view it on GitHubhttps://github.com/muquit/mailsend/issues/71#issuecomment-74158818.