You need to sign in to do that
Don't have an account?
Lakshmi S
setTargetObjectId(targetObjectId) is used while sending email from Apex code using SingleEmailMessage.
Hi Team,
I am using setTargetObjectid(userInfo.getUserId()) is used while sending email from Apex code using Single Email Message for template.
I didn;t get email.
Please let me know how can we do that using userid instead of contact.
Thanks
Lakshmi.
I am using setTargetObjectid(userInfo.getUserId()) is used while sending email from Apex code using Single Email Message for template.
I didn;t get email.
Please let me know how can we do that using userid instead of contact.
Thanks
Lakshmi.
I trust you are doing very well.
Below is the sample code which I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.
Thanks and Regards,
Khan Anas
Thanks for your reply.
It's not working for me.
please let me know.
Thanks.
Lakshmi.
Please add below line of code after mail.setTemplateId(et.id); in my code, it will work and try to filter your query to fetch users.
Regards,
Khan Anas
Already i used same format, but it's not working .
Thanks,
Lakshmi.