Error while Sending mail AX 2009

hi,

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.

http://fredshen.wordpress.com/2009/08/14/cdo-message-error/

Hi,

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.

Hi

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

Please help.

Thanks

Raj

Hi

It depends on E-mail parameters in AX. If you want to send an email to an external recipient (e.g.: @xyz.com 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.: @abc.com in your case).

Hi All,

We have the same issue that we are not able to send the mail to outside domain like @abc.com however we are able to send mails to our domain like @kbc.com.

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.

Hi,

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.

Thanks,

Prabhakar

Try this

void new(COM c = null)

{

COM cdoConfig;

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

;

permission.assert();

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

this.configuration(_configuration);

}

else

{

//BP Deviation Documented

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

}

//BP Deviation Documented

_fields = _configuration.fields();

_fields.add(#sendUsing,#cdoSendUsingPort);

_fields.resync();

}