Allow string as delivery_method #461

Merged
merged 1 commit into from Nov 17, 2012

Projects

None yet

3 participants

@radar
Contributor
radar commented Nov 17, 2012

This PR contains the change from #457 as well as two tests: one for teting a nil delivery method, and the other for testing a string delivery method.

@mikel
Owner
mikel commented Nov 17, 2012

Thanks, merged :)

@mikel mikel merged commit 2b79ba9 into mikel:master Nov 17, 2012
@skyeagle
Contributor

I have had an issue with this. I am using mail 2.5.3 version which has already fixed this issue. But the same config with replaced :smtp on smtp gives an error on postfix smtp:

Dec 18 11:54:13 ... postfix/smtpd[11248]: connect from localhost[127.0.0.1]
Dec 18 11:54:13 ... postfix/smtpd[11248]: lost connection after STARTTLS from localhost[127.0.0.1]
Dec 18 11:54:13 ... postfix/smtpd[11248]: disconnect from localhost[127.0.0.1]

According to this article my configuration has openssl_verify_mode: 'none' option.

Replacing back String to Symbol in delivery_method solves that.

Here is my configuration.yml file which are loading by redmine

---
production:
  email_delivery:
    delivery_method: smtp
    smtp_settings:
      address: 'localhost'
      port: 25
      openssl_verify_mode: 'none'
      enable_starttls_auto: false

The problem is not clear at the moment for me.

Any help appreciated. Thanks.

@skyeagle
Contributor

@radar @mikel It is rails related issue. This case statement don't respect strings. I made workarround adding line above of case like that:

        method = method.to_sym if method.is_a?(String)

I tried to find tests for that code with no success. Symbols are hardcoded in rails for delivery methods. It would be great if a someone from rails core take a look on this issue.

@mikel
Owner
mikel commented Dec 19, 2012

Hi there Skyeagle, thanks, I'll get that fixed in ActionMailer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment