web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Sending email to hotmail through x++

(0) ShareShare
ReportReport
Posted on by

static void emailThruSysMailer(Args _args)
{
SysMailer mailer = new SysMailer();
SysEmailParameters parameters = SysEmailParameters::find();
;

if (parameters.SMTPRelayServerName)
{
mailer.SMTPRelayServer(parameters.SMTPRelayServerName,
parameters.SMTPPortNumber,
parameters.SMTPUserName,
SysEmailParameters::password(),
parameters.NTLM);
}


mailer.fromAddress('varunshankar12@hotmail.com');
mailer.tos().appendAddress('varunshankar12@gmail.com');
mailer.htmlBody('AZZZ');
mailer.subject('Comunicazione AX');

mailer.sendMail();
}

Above is the code that i am trying to run but following error message comes

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

what might be the reason.

In email parameters form

i have set smtp.live.com as outgoing email server,local computer name as my PC name,User name is my Hotmail address,password is my hotmail passsword. port number i have set to 25

*This post is locked for comments

I have the same question (0)
  • XB Profile Picture
    1,875 on at

    I 've test your code and works fine so the problem will be on your configuration.

  • Suggested answer
    Faqruddin Profile Picture
    1,883 on at

    I think you are SMTP is not configured. Also check System Email Parameters. For SMTP and Email configuration. Check this file www.uxceclipse.com/.../fact-sheet-dynamics-ax-2012-configuring-alerts-and-emails.pdf .

  • Community Member Profile Picture
    on at

    Hi faqru and Javier,

    I tried configuring but mine is ax 2009  with ax 2008server r2.Can any one pls help me with the configuration of the smtp...where i can find steps for that?

  • Mariano Gracia Profile Picture
    on at

    You can't use hotmail as it requires TLS autentication wich is not supported in AX, you will have to use a local exchange server and use it as a bridge to your hotmail account, there is a howto in this link (translated from spanish). By the way, your first try sending an email must be allways done through telnet, once you're successfull you can do it in AX.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans