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
Attachments are ignoring filename when sent using ActionMailer #82
Comments
@rmcsharry I'm assuming this is with the new Railgun code / version 1.1.4 of the gem? |
Yes - mailgun-ruby (1.1.4). I also tested with Postman and the filename there shows up as 'pd_mime_attachment'. So it seems both gmail and postman see that the filename is empty and substitute a default value. I suppose it could be ActionMailer doing this, but then surely Stack Overflow would be swamped with questions about this? It used to happen in Rails 3. I've opened a question anyway for Rails 5 to see if anyone else has seen this in ActionMailer specifically. |
@rmcsharry I will look in to this, it very well could be an issue with Railgun. I'll let you know what I find :) |
@rmcsharry I think I found the issue. Stand by for a PR. |
@pirogoeth Awesome, thanks for the quick fix. I just tested it and it works! :) |
@rmcsharry Awesome! I'll cut an official release on Monday :) |
@pirogoeth This branch I tested was labelled as version 1.1.5. But now that you have merged it, the version of master branch did not change, it is still 1.1.4 - was that the intention? |
@rmcsharry It seems that 1.1.5 has been released to Rubygems and 1.1.5 is in master (tagged as v1.1.5).. |
Ok thanks I just removed it from my project and bundle installed again, now it shows up as 1.1.5. Thanks for confirming! |
Of course! |
new issues can any one please help me with this i want a attachment file that was send to the mailer has to be open in a new tab is it possible to make the pdf file to open in a new tab |
I have Rails 5.0.1 using ActionMailer code as follows:
I have tried by hardcoding 'test.pdf' also. I have tried replace flilename: with remoteName inside the hash (as I see th PHP plugin uses remoteName).
No matter what I try the filename does not appear in the JSON in the mailgun logs.
I can however see it in the Rails log. For example, here is the log when I tried using remotename:
Here is the relevant part of the JSON from the mailgun log:
"message": {
"headers": {
"to": "Richard McSharry ",
"message-id": "20170221213251.124698.55612.AAE859F0@sandbox4d05645e78ac4c81b7b542d27c5e87ad.mailgun.org",
"from": "Floorbook UK ",
"subject": "Your Personal Flooring Quote is attached"
},
"attachments": [
{
"filename": "",
"content-type": "application/pdf",
"size": 9004
}
],
"recipients": [
"my email"
],
"size": 11517
},
The text was updated successfully, but these errors were encountered: