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
Sendmail argument change breaks Rails usage of Sendmail #1538
Comments
Seems serious. @mikel how about a fix that doesn't raise here
|
@eval yes, that makes sense, we should make that a PR and get that deployed as 2.8.1 right away. If we get a string, split it and put it back in. |
Agree with restoring support for string. However if valid arguments can contain blanks, it makes correctly splitting the string tricky. Whilst this would not be as safe against shell mis-interpretation, it is very unlikely that the arguments provided by callers are derived directly from user input. As well as emitting a warning, it would be useful to document why a string is deprecated. |
Hi. Just for the sake of feedback : mail 2.8.0 is indeed breaking my rails application in production when trying to deploy on AWS Beanstalk. I am running ruby 3.0.5 and rails 6.1.7. Reverting back to 2.7.1 fixes it back. Hope this will help. |
Good point @sebbASF. But adding an argument with spaces doesn't work either right? E.g. |
Good point, agreed |
|
The latest `mail` version `2.8.0` broke the interface that `rails` have been using: mikel/mail#1538 Hopefully support will be restored for the old one. Signed-off-by: Ferenc Géczi <ferenc.geczi@ibm.com>
The latest `mail` version `2.8.0` broke the interface that `rails` have been using: mikel/mail#1538 Hopefully support will be restored for the old one. Signed-off-by: Ferenc Géczi <ferenc.geczi@ibm.com>
Same here, this broke multiple production Rails apps. Reverting to 2.7.1. |
Fixed via #1545 |
The sendmail default sendmail arguments configuration value given by actionmailer is "-i". Which was fine for the older mail gem. The new gem requires this to be an list of strings. mikel/mail#1538 https://www.gamecreatures.com/blog/2022/12/19/ incompatibility-rails-5-2-and-mail-gem-argumenterror-arguments-expected-to-be-an- array-of-individual-string-args/
Update sendmail settings to fix argument error. See: mikel/mail#1538 See: rails/rails#46650
Update sendmail settings to fix argument error. See: mikel/mail#1538 See: rails/rails#46650
I see from the CHANGELOG for
v2.8.0
that the following change was made intentionally:It was even listed as a "breaking change," so this issue is more of a question than a bug report. But I wanted to note that this change breaks how Rails' ActionMailer implements Sendmail:
I don't know whether or not Rails applications represent a large portion of apps that use the
mail
gem, but in case they do, I wanted to point out this potentially high-impact breakage and confirm that it was deemed acceptable before attempting to fix things within Rails.Thanks!
Additional info on breakage:
When attempting to deliver mail via the
:sendmail
method withrails 7.0.4
andmail 2.8.0
, I get a runtime error like the following:If the Sendmail
argument
signature is to stay as it is, I believe action_mailer will need to change its instantiation of:sendmail
to:The text was updated successfully, but these errors were encountered: