I'm using ActionMailer for my Rails 2.3.9 application.
When I send an email using:
deliver_user_invite
config:
def user_invite(subject, content)
subject subject
from "User Invite <[email protected]>"
recipients "[email protected]"
sent_on Time.now
content_type "text/html"
body :content => content
end
with SMTP configuration
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'mydomain.com',
:authentication => :plain,
:user_name => '[email protected]',
:password => 'password'
}
However when the email is sent, the sender email shows as [email protected] instead of [email protected].
Can I have different SMTP configuration for different email addresses? or Is there a way to set the sender email address from ActionMailer config?