+ Start a Discussion
Nandhini GovindrajNandhini Govindraj 

How to write apex class for email bounce

vineet kumarvineet kumar

Hello Nandini,

Why do you want to write apex class for email bounce when you can simply configure it. check the below link.

Email Bounce (https://help.salesforce.com/s/articleView?id=sf.emailadmin_bounce_enable.htm&type=5)

 

Thanks,
Vineet

SwethaSwetha (Salesforce Developers) 
HI Nandhini,
See https://salesforce.stackexchange.com/questions/274601/unit-tests-on-bounced-email

This link has sample code for bounced email and the related test class too.

Related: https://developer.salesforce.com/forums/?id=9060G000000XieQQAS

If this information helps, please mark the answer as best. Thank you
Nandhini GovindrajNandhini Govindraj
Need to write apex class for email bounced date and reason fields has value