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

Announcements

News and Announcements icon
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,909 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 16

#2
Nagendra Varma K Profile Picture

Nagendra Varma K 4

#2
Harisgillani Profile Picture

Harisgillani 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans