function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Email Exception Handling conflicting with Governer Guidelines

I have a process that sends emails to the Contacts of a set of Accounts (customer notification).  To do this, I create the message for each Account, as it is customized for the Account.  Because of the governer limit of 10 on invoking email send, I accumulate these in an array, then send at once. 


Unfortunately, if any of the emails are on a bounce list, then it fails to send any of them.  At any given time you are likely to one or more customer emails bounce, so this is very impractical.  Moreover, although I notify the requester of the exception, it does not include the email address that bounced, so is hard for an end-user to remedy:


First exception on row 1; first error: INVALID_EMAIL_ADDRESS, email address has bounced for id : 0037000000RqE7e: []


Even if I parse and discover the email address of the contact, there are reasons why an end-user cannot necessarily correct the situation, such as the customer's email server is temporarily unavailable.  


How does this conflict with the governer guidelines?  If there wasn't a limit of 10 send requests per HTTP request, I'd send each email individually, permitting all the others to successfully be sent despite the failure.  



While producing a production app for a Fortune 500 company that is currently using it for its sales force as well as instances for its divisions, this custom app has, to some extent, been a pilot of the potential for increased custom app capability and expanding our user licenses to include other departments, such as customer service, supply chain, communications and IT.  It is unfortunate that the technical problems created by the governor limits, no matter how well intentioned, do not appear to have an path for resolution.  In addition to posting here, I created a case yesterday with no response, yet. 


Within a day or two, short of a resolution to the issues arising from the governor limits, I have to inform the business sponsors that their planned investment in expanding their use of to increase communication with the customer is too risky, as I cannot guarantee, with the current hard set governor limits and possible unintended consequences that the application can scale to meet their needs.  Perhaps, in the end, never intended to provide its services to larger enterprises with increased resource needs. 





DId you ever gor to resolve this issue, I am facing same issue.