1

Does anyone know how the default email sender address is determined when sending an email via Apex (SingleEmailMessage) from a public Force.com site without setting the organizationWideSenderId?

Currently it is a regular Salesforce user's email address but I cannot determine why that particular email address is used, since the invocation of the apex method happens through a public force.com site and there's no SF user associated with that.

That particular user (the one who's email is currently used) is NOT listed as the site's contact (that would be a different one).

Can't seem to find any documentation of this either... Thanks!

1 Answer 1

1

There is always a user associated with it.

Follow steps below:

  1. Go to Setup > Developer > Sites
  2. Click on site label
  3. On "Site Detail" click on "Public access setting" button
  4. On profile click on "Assigned User" button

You would see a user. The email of user would be the email of site owner.

Something like this:

enter image description here

OR

You can search it by "*Guest User*" in search input. It has "guest user" name.

3
  • I think you mean the "Assigned User" on the site's detail page itself, not the public profile (there is no field "Assigned User"), right? If yes, then that's not what I'm looking for: The user set up there has a different email address than the one that's used when an email is sent.
    – Christoph
    Commented Oct 29, 2015 at 6:21
  • On site detail page, there is a button "Public Access Settings". When you click on it, it will direct you to the site profile as shown in image above. @Christoph
    – Ashwani
    Commented Oct 29, 2015 at 6:24
  • 1
    Worked perfectly, thanks. Was hidden well enough :)
    – Christoph
    Commented Oct 29, 2015 at 7:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .