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

Sites and Apex Outbound Email

I am building a Site that sends out an email confirmation using Apex SingleEmailMessage class. I see in the Apex documentation for Outbound Email states: "The email address of the user calling the sendEmail method is inserted in the From Address field of the email header. " 


Question - When using Sites, who is the user calling the sendEmail method? Is it the User configured as the Site Contact? 


Ultimately, I am trying to set the "From Address" as a "" type of email address. I know how to set the Reply-To and Display Name values. But I am trying to understand how the From address is set in a Site.





Best Answer chosen by Admin (Salesforce Developers) 

site details> public access settings> View users > edit and update the email address



this is a special user (you can't login, no password etc) that is not exposed (usability reasons)  in many places in the app. Bu you can see it as the owner if you create a record or when you create sharing