Hi

In all likelihood your mail server is preventing the AX client from relaying 
(accepting an SMTP mail message and then sending it on to an external mail 
server) the message. This is standard mail server setup.

You should...


1.       Ensure that your code runs on the AX server (e.g. put the code into a 
"Server" class).

2.       Modify the mail server setup to allow relaying from the IP address(es) 
that you AOS lives on.

You might also find that your anti-virus software is getting in the way as some 
of these are smart enough to intercept SMTP mail sent by unknown application. 
To fix this you'd need to change the AV setup so that it accepts ax32.exe and 
dsmailer.dll as sources of SMTP mail.

Regards


Malcolm Burtt
Touchstone Group
People - Partnership - Solutions



From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
nageshsinha
Sent: 23 June 2008 12:06
To: [email protected]
Subject: [development-axapta] Sending mail through Dynamics AX


Hello everyone,

I want to send mail to my yahoo account from axapta. I wrote the
following code

Sysmailer mailer;
;

mailer = new sysmailer();
mailer.fromAddress("[EMAIL PROTECTED]<mailto:abc%40mycomp.com>");
mailer.tos().appendAddress("[EMAIL PROTECTED]<mailto:abc%40mycomp.com>");
mailer.subject("Hi");
mailer.body("Hi");

mailer.SMTPRelayServer("mail.mycomp.com");
mailer.attachments().add(@"D:\Test\Test.txt");
mailer.sendMail();

It works fine for our intermail mail, but when I try to send it to
my personal account, say, [EMAIL PROTECTED]<mailto:abc%40yahoo.com> or [EMAIL 
PROTECTED]<mailto:abc%40hotmail.com>, it gives
the following error

Error:
Method 'send' in COM object of class 'CDO.Message' returned error
code 0x80040211 (<unknown>) which means: <unknown>.

Can anyone help me to come out of this problem.

Thanks in advance



[Non-text portions of this message have been removed]

Reply via email to