You need to sign in to do that
Don't have an account?
Email from address on Sites app written in VF/Apex.
I have a real small sites app that was written in VF by another developer.
The controller uses Apex Messaging.sendEmail to send an email. The from email address is coming from a specific user's email address as if the sendng user is hard-coded somewhere but I don't know where. it's not in the Apex code.
The setSenderDisplayName() and setReplyTo() methods are used to set those options and they come out okay. But the actual from address isn't/can't be set with method calls. The documentation says it comes from the current user. I'm not sure what the user would be in the context of a Sites app. I checked the Site Contact on the site configuration and changed it but that's not it.
So this email is still being sent from some hard-coded User's address. I can't find it anywhere.
Any clue where it might be coming from?
I believe it should be from the Site User (Setup > Develop > Sites > SIte Name > Public Access Settings > View Users). I've never had to answer that question (yet), so I might be off the mark on this one.