muquit / mailsend

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

Failure to attach a file that has a comma in the name #67

Closed XJDHDR closed 9 years ago

XJDHDR commented 9 years ago

I just discovered that if you try to attach a file that has a comma in the name, the file doesn't get attached. Furthermore, when I log the output of Mailsend, I get the following: 09-Nov-2014 19:58:12.574: mailsend v@(#) mailsend v1.17b14 09-Nov-2014 19:58:14.221: Error: smtp.c (816) - Could not open file for D:\Backup folder\Saves\Pieces\Hitman; Blood Money - All missions reading (No such file or directory) 09-Nov-2014 19:58:15.158: Mail sent successfully

The name of the file I was attaching is: Hitman; Blood Money - All missions, all weapons & all upgrades.7z.001.7z

I then attempted another test except with verbose logging. I got the following: 09-Nov-2014 20:15:47.240: mailsend v@(#) mailsend v1.17b14 09-Nov-2014 20:15:47.240: Connecting to smtp.googlemail.com:465 09-Nov-2014 20:15:48.609: [S] 220 mx.google.com ESMTP gs9sm20020345wjc.47 - gsmtp 09-Nov-2014 20:15:48.610: [C] EHLO localhost

09-Nov-2014 20:15:48.805: [S] 250-mx.google.com at your service, [197.245.83.74] 09-Nov-2014 20:15:48.805: [S] 250-SIZE 35882577 09-Nov-2014 20:15:48.806: [S] 250-8BITMIME 09-Nov-2014 20:15:48.806: [S] 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER 09-Nov-2014 20:15:48.806: [S] 250-ENHANCEDSTATUSCODES 09-Nov-2014 20:15:48.807: [S] 250-PIPELINING 09-Nov-2014 20:15:48.807: [S] 250-CHUNKING 09-Nov-2014 20:15:48.807: [S] 250 SMTPUTF8 09-Nov-2014 20:15:48.807: Using AUTH PLAIN 09-Nov-2014 20:15:48.807: [C] AUTH PLAIN AFhhdmllckpESGRlUmF1dmlsbGVQU0VAZ21haWwuY29tAGppTlBtd01lc2dL

09-Nov-2014 20:15:49.088: [S] 235 2.7.0 Accepted 09-Nov-2014 20:15:49.089: PLAIN Authentication succeeded 09-Nov-2014 20:15:49.089: [C] MAIL FROM: removed@gmail.com

09-Nov-2014 20:15:49.282: [S] 250 2.1.0 OK gs9sm20020345wjc.47 - gsmtp 09-Nov-2014 20:15:49.283: [C] RCPT TO: removed@yahoo.com

09-Nov-2014 20:15:49.476: [S] 250 2.1.5 OK gs9sm20020345wjc.47 - gsmtp 09-Nov-2014 20:15:49.477: [C] DATA

09-Nov-2014 20:15:49.699: [S] 354 Go ahead gs9sm20020345wjc.47 - gsmtp 09-Nov-2014 20:15:49.699: Subject: te,st - 1 of 1

09-Nov-2014 20:15:49.699: From: removed@gmail.com

09-Nov-2014 20:15:49.700: Date: Sun, 09 Nov 2014 20:15:49 +0200

09-Nov-2014 20:15:49.700: To: removed@yahoo.com

09-Nov-2014 20:15:49.701: X-Mailer: @(#) mailsend v1.17b14 (Windows)

09-Nov-2014 20:15:49.701: X-Copyright: BSD. It is illegal to use this software for Spamming

09-Nov-2014 20:15:49.701: Content-type: multipart/mixed; boundary="ZrpBzizP/XI911v/"

09-Nov-2014 20:15:49.701: Mime-version: 1.0

09-Nov-2014 20:15:49.701:

09-Nov-2014 20:15:49.702:

--ZrpBzizP/XI911v/

09-Nov-2014 20:15:49.702: Content-Type: text/plain; charset=us-ascii

09-Nov-2014 20:15:49.702: Content-Disposition: inline

09-Nov-2014 20:15:49.702: smtp.c (807) - MIME temp file: C:\Users\removed\AppData\Local\Temp/mailsenda06384 created successfully, FILE pointer=1b2620 09-Nov-2014 20:15:49.703: Error: smtp.c (816) - Could not open file for D:\Backup folder\Saves\Pieces\te reading (No such file or directory) 09-Nov-2014 20:15:49.703:

[C] .

09-Nov-2014 20:15:50.589: [S] 250 2.0.0 OK 1415556962 gs9sm20020345wjc.47 - gsmtp 09-Nov-2014 20:15:50.589: [C] QUIT

09-Nov-2014 20:15:50.785: [S] 221 2.0.0 closing connection gs9sm20020345wjc.47 - gsmtp 09-Nov-2014 20:15:50.785: Mail sent successfully

This time, the file I used was named: te,st pieces.7z.001.7z

muquit commented 9 years ago

Plese use mailsend v1.17b15. It has a feature to use a different separator for attachment other than comma (default). Example:

-separator "|" -enc-type "base64" -attach "c:\filename,with,comma andspace.png|image/png"

Thanks.

XJDHDR commented 9 years ago

Gee, can't believe it's been nearly 3 months. Anyway, I guess your solution would work. However, your releases page states that b15 is for testing only. Unless there are no major bugs, I would prefer waiting for a more stable version to be released.

muquit commented 9 years ago

v1.17b15 is stable, you can use it safely. Thanks.

XJDHDR commented 9 years ago

I have been using v1.17b15 for the last 6 months now and it seems to solve this problem. I also notice that you recently released v1.18 which is marked as stable. Thus, I think this issue can be closed now.