function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Josip Juric87Josip Juric87 

Email Relay - what's the from-address?

If we setup email relaying through our SMTP server, and send with Apex an Email, what will be the from address of the email? I assume it's the current user's email address, but I'm not sure. If it is, can it somehow be changed?
NagaNaga (Salesforce Developers) 
Hi Josip,

There is a salesforce knowledge article that covers this. Go to Setup > Administration Setup > Email Administration > Deliverability Under the email security compliance section, turn off the SenderID compliance checkbox, and now email vendor / clients will not include the "Send on behalf of".

Please keep in mind, by enable to comply with Sender ID email protocols. This declares salesforce.com emails as coming from an authorized IP address. 

An alternative as well is to enable Email Relaying. What is Email Relaying? Email relaying is using an email server to send email that did not originate on the email server. Companies set up email relaying to:

Route all email through their own email servers to avoid the appearance of email spoofing by Salesforce. Email spoofing is the forging of email headers to make messages appear as if they came from someone other than the original sender.
Store copies of all email as required by government regulations in various industries.
Apply existing content filters that scan messages for data and content that is not approved to be sent out through company email.
Run outbound email through antivirus software before sending it to customers.
Append data such as company-wide disclaimers at the bottom of email messages.

You can set up email relaying for Salesforce-generated email by configuring Salesforce to automatically route email through your company's Simple Mail Transfer Protocol (SMTP) server.

https://help.salesforce.com/apex/HTViewSolution?id=000167022&language=en_US

Best Regards
Naga kiran