muquit / mailsend

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

command-line options for "Content-Transfer-Encoding: quoted-printable" #14

Open muquit opened 10 years ago

muquit commented 10 years ago

From patrick....@gmail.com on June 29, 2013 12:22:52

What steps will reproduce the problem? mailsend -smtp smtp.gmail.com -port 465 -ssl -v -auth -user someone -pass something -f someone@gmail.com -t someother@gmail.com -cs Big5 -sub "text in chinese test" -M "text in chinese test 中文測試" What is the expected output? What do you see instead? "中文測試" is the meaning of "text in chinese test" It should display the correct words. However I got the worng code as "銝剜?皜祈岫" What version of the product are you using? On what operating system? mailsend1.17b12.exe Windows XP in Big5 Chinese Please provide any additional information below. I guess it would be someting wrong in the path which that passing the double word charset.

So, I sent the mail by mailsend and using gmail to send it again. To check the difference.

sent by mailsend :

Content-Type: text/plain; charset=Big5 Content-Disposition: inline

text in chinese test 銝剜?皜祈岫

sent by gmail :

Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: quoted-printable

Chinese text testing =A4=A4=A4=E5=B4=FA=B8=D5

The key difference is "Content-Transfer-Encoding: quoted-printable". So, I have a suggestion. Can you provide the command-line options for user for assign the Encoding about "quoted-printable" ? If it can be, your program can send any kind of word for gmail system without any problem!

Thank you!

Original issue: http://code.google.com/p/mailsend/issues/detail?id=14

muquit commented 10 years ago

From muq...@gmail.com on June 30, 2013 07:34:37

ok, will add a command line option for that

Status: Accepted

muquit commented 10 years ago

From muq...@gmail.com on July 02, 2013 08:34:15

It turned out that the problem is not the encoding rather problem with reading multibyte characters from windows command line. mailsend uses standard C functions and does not have support for multibyte input from windows command line. I tested from Linux using gmail SMTP and the message was correct even without any encoding (just needed to specify charset to Big5). I will add the support for multibyte characters for -M option in windows but it will take some time.

Thanks.

muquit commented 10 years ago

From muq...@gmail.com on October 19, 2013 17:38:42

The option -enc base64 is available in v1.17b13. However multibyte character input in windows still remain, I just do not have time to change all the string related functions to handle multibyte input. So the new option is only useful in Linux and Mac.