Created
September 12, 2013 13:19
-
-
Save johncant/6537138 to your computer and use it in GitHub Desktop.
Send emails with MS Exchange
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use whatever your sysadmin says your settings are supposed to be | |
# ... | |
# ... | |
# The problem we had was that the SMTP server our outsourced sysadmin | |
# would send emails to Gmail, but they would not be received by the MS | |
# Exchange that he had set up for us. Our Rails mailer config was | |
# causing a spurious value in the SMTP "MAIL FROM" statement. This | |
# fixes it: | |
class ActionMailer::Base | |
layout 'email' | |
smtp_settings = # foo | |
# This WILL NOT WORK! It causes MAIL FROM <garbage@your_app_servers_hostname> | |
default :sender => "Boppl" | |
# This works! | |
default :sender => "Boppl <support@boppl.me>" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment