You need to sign in to do that
Don't have an account?
Nirmal Vasanthakumar
Send Email With TargerObjectId as Person Account
Hi,
I am trying to send Email via Messaging.MassEmailMessage by setting TargetObjectIds method. Even though it specifies TargetObjectIds to be a list of IDs of the contacts, leads, or users to which the email will be sent.
I want to ensure whether PersonAccountId can be set to TargetObjectIds to send mass email.
Hi Nirmal,
I dont think this is currently possible, Vote for the Idea on the link below which will be considered for future releases.
Need ability to assign Person-Account Id in the TargetObjectId field of a Single
https://success.salesforce.com/ideaView?id=08730000000BrJG
Regards,
Ashish
Hi Nirmal,
Also once try if using the What Id of the Record works as below.
msg.setTargetObjectId(con.Id);
msg.setWhatId('Your Record Id if applicable');
http://techman97.wordpress.com/2013/10/08/sending-email-template-via-apex-no-targetobjectid/
What ID:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_Messaging_SingleEmailMessage_setWhatId.htm
TargetObjectId:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_Messaging_SingleEmailMessage_setTargetObjectId.htm
More info:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_sendemail.htm
http://www.opfocus.com/2013/01/sending-emails-in-salesforce-to-non-contacts-using-apex/
Regards,
Ashish
Mark it as the best answer!