-
Notifications
You must be signed in to change notification settings - Fork 178
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
Sending from different email addresses? #27
Comments
Just set a custom from address in your mailMessage object inside your mailer. Here's an example: class MyMailer extends MailerBase{ |
thanks |
Sorry about my previous question. I didn't explain myself properly: since i am using Gmail, I would like to use different credentials for every different account. I can change the FROM field but if I use the same SMTP account the email will still show as originating from another account. Is there a way to specify different SMTP accounts/settings for each message? Thanks a lot! |
Use a smtpclient instance to send your email. That way you can Sent from my iPhone On 2011-09-29, at 4:59 PM, qbantek
|
This is not working for me at all. I am setting the mailmessage with a different FROM address and then it fails on the send. This email should have the same credentials as the account specified in the web config for the mailer. |
Check the details of the smtpClient you are using. If you are creating the instance, check if it gets the configs applied to it. If you want, for a nominal consultation fee, I can look at your specific code and help you reach a solution. |
Thank you! Stepping out for the afternoon, but I will get back with you On 10/9/2013 3:29 PM, SM Sohan wrote:
|
The owner of the exchange server says that the email address is inbound On 10/9/2013 3:29 PM, SM Sohan wrote:
|
That'll make it fail to send a mail anyway. Sent from my iPhone On Oct 9, 2013, at 2:37 PM, janessaallen notifications@github.com wrote: The owner of the exchange server says that the email address is inbound On 10/9/2013 3:29 PM, SM Sohan wrote:
— |
Okay, thank you so much for the information. On 10/9/2013 4:38 PM, SM Sohan wrote:
|
My application sends notifications from different email addresses (sales@xxx.com, alerts@xxx.com, etc). How can I set a different [To] email (and even a different SMTP server) from code?
The text was updated successfully, but these errors were encountered: