Hello,
I have put together code to write a job to send emails to the customers attaching their pdf invoice copies. I used SysEmailer object and it is working pretty well in production for all the customers email addresses except for one customer.
When I looked at the job history I see the error "Method 'send' in COM object of class 'CDO.Message' returned error code 0X8004020F(<unknown>) which means <unknown>."
I also checked to see if there are any spaces before and after the email address in question and also used trim functions to trim any spaces no luck with that either.
Searched google and came across few links that describe the error codes
https://msdaxerp.wordpress.com/2013/03/12/cdo-message-returned-error-code/
My error code means that:
0x8004020F
The server rejected one or more recipient addresses. The server response was: %1
If I understand it correct, our server is rejecting the customer's email address.
1) I am trying to understand why our server rejects this particular recipients address?
But when our users send the invoice pdf to the same address from their outlook it goes through fine and no issues.
2) How can catch exceptions in my sendEmail() method for any potential CD.Message errors?
Any inputs are greatly appreciated.
Thanks!
Dev