-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Space in filename causes error when using mime-mail-ses #54
Comments
Sounds reasonable. Would this be a change to mime-mail or mime-mail-ses?
…On Sun, Mar 25, 2018 at 1:03 PM, Christian Reite ***@***.***> wrote:
When sending an email with an attachment with the filename "test
hello.txt" I get the error:
*** Exception: SESException {seStatus = Status {statusCode = 400, statusMessage = "Bad Request"}, seCode = "InvalidParameterValue", seMessage = "Expected ';', got \"hello.txt\"", seRequestId = "a5b13731-300e-11e8-9a7a-a3641b570f3f"}
This is probably because the filename is not quoted when rendering the
email. When I quote the filename myself "\"test hello.txt \"" it works.
I think it would make sense to quote the filename when rendering the mail.
I can send a pull request if you agree?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#54>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADBBwJl6h5z0jKkFp77levm0ar97F51ks5th2tbgaJpZM4S6FH9>
.
|
To mime-mail/mime-mail/Network/Mail/Mime.hs Lines 166 to 168 in 5d47f26
Replacing fn with T.intercalate fn ["\"", "\""] would do it. However if someone is already quoting their file names this would cause issues, but I dont see any way around that without extra complexity.
I did some research on this and according to rfc2616 19.5.1 filenames should be quoted. However this spec is outdated and in the newer spec rfc6266 quoting is optional. So this is probably a bug in amazons parser. So I'm not sure if it makes sense to make this change if its only a problem for amazon. |
CCing @danchoi about changes to mime-mail itself. |
I've had some reports of issues with AOL.com email where filenames like Would you like a pull request to quote attachment filenames? |
I'd be open to such a PR. |
When sending an email with an attachment with the filename
"test hello.txt"
I get the error:This is probably because the filename is not quoted when rendering the email. When I quote the filename myself
"\"test hello.txt \""
it works.I think it would make sense to quote the filename when rendering the mail. I can send a pull request if you agree?
The text was updated successfully, but these errors were encountered: