You need to sign in to do that
Don't have an account?
monkeyking
Different 'From' address for Single Email message
Hello All,
We have a business scenario where the 'From' address used in Single email message should be different based on the Counry(a custom field in our og).
I know how to set the 'From' address in Single Email message.
Just wondering are there any other methods to have different from address based on the countries.
Thanks is advance.
Regards,
Rajkumar CV
We have a business scenario where the 'From' address used in Single email message should be different based on the Counry(a custom field in our og).
I know how to set the 'From' address in Single Email message.
Just wondering are there any other methods to have different from address based on the countries.
Thanks is advance.
Regards,
Rajkumar CV
To do this you must first set up a dedicated email address by navigating to Setup -> Administration Setup -> Email Administration -> Organization-Wide Addresses menu. Once you have created an org-wide address (note that Salesforce will require you to confirm the address prior to using it, so if you're going to be sending things from a junk address it would be wise to set up a catch-all mailbox so you receive the confirmation email), grab the Id from the URL and use the setOrgWideEmailAddressId(Id) method on your instance of Messaging.SingleEmailMessage.
If you want to avoid hard-coding an Id, after creating your Org-Wide Address you can query them:
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Ajay Dubedi
www.ajaydubedi.com