+ Start a Discussion

[Urgent help required!!] Email Services

Dear All,


My requirement is to send Order detail email using Messaging.SendEmailResult. And whenever an invalid email occurs we need to send the same to user. We used SendEmailError object but not able to track invalide email error.


Currently we are sending using a schedulable bacth class to send email. Standard Salesforce.com will send the bounce back message (invalid email) to the user who schedule the bacth class. Our requirement is to send the message to the user who actually created an Order.


Expected Scenario:

01) User [Sales Rep] creates an order.

02) Scheduled bacth class will pick up all the orders which are not sent (using a flag to identify which are sent and not sent) from a custom object and send email to concern account.

03) If account email is invalid then it should be notified to the user [Sales Rep] who creates the order.


Current Scenario:

Point#3 is not working. The invalid email notification is sending to the user [say System Admin] who scheduled the batch class. We are not able to redirect the email to the user who created the Order.


Please help! Quick response would be appreciated.