Error while Sending mail AX 2009


m using the SysMailer.sendmail() for sending mails from server. But i got the below error.

Method ‘send’ in COM object of class ‘CDO.Message’ returned error code 0x8004020F () which means: .

Ple anybody help me .

Pls check this link for further clues.


Thanks anitha. I referred that site. i got solution for this.

sysmailer class always supports the server mail address only.

i changed and its working now.


I want to send mail to a customer mail id lets say and from mail id is . while sending mail using sysmailer it’s getting failed but it works fine if the TO mail id is my domain i.e How can i resolve this issue?

Please help.




It depends on E-mail parameters in AX. If you want to send an email to an external recipient (e.g.: in your case), user name from E-mail parameters form must be the same as sender. It doesn’t matter who is sender if recipient is internal (e.g.: in your case).

Hi All,

We have the same issue that we are not able to send the mail to outside domain like however we are able to send mails to our domain like

Error is “Method ‘send’ in COM object of class ‘CDO.Message’ returned error code 0x8004020F () which means: .”

We have check all the points like:

Email Parameters in Administration module and we have check our SMTP server also.

Sysmailer RunOn property in AX 3.0 is Server where as Sysmailer RunOn property in AX 3.0 is Called From.

Any Help?

Umesh Pandit

Thanks Amico,

Your reply helped me in sorting out my problem.


I am trying to send a mail using templates in ax 2009 using sysmailer class.

I am getting an COM error at this line

COM document = new COM(#HTMLDocumentClassName); when calling from Form.

and it is working fine when I am testing it from a Job.

From and to mail ID s are on same domain.



Try this

void new(COM c = null)


COM cdoConfig;

InteropPermission permission = new InteropPermission(InteropKind::ComInterop);



c = new COM(‘CDO.Message’);

_COM = c;

//BP Deviation Documented

if (_COM.configuration() == null)


//BP Deviation Documented

cdoConfig = new COM(‘CDO.Configuration’);

_configuration = SysMailerConfiguration::create(cdoConfig);

//BP Deviation Documented





//BP Deviation Documented

_configuration = SysMailerConfiguration::create(_COM.configuration());


//BP Deviation Documented

_fields = _configuration.fields();