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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Send E-mail by batch using google SMTP server

(0) ShareShare
ReportReport
Posted on by 577

I have set the parameters in E-mail parameters as follow

Outgoing mail server: smtp.gmail.com

SMTP port number: 587

User name: tony.mok.ax@gmail.com

Password: ***********

Also, batch group and batch under E-mail processing are set.

I saw a post mentioning that adding smtpClient.set_EnableSsl(true); in the sendMail() of SysMailerNet and I tried. 

The E-mail cannot be sent still. The status of E-mail is Failed in the E-mail sending status.

What else should I set?

*This post is locked for comments

I have the same question (0)
  • Tony Mok Profile Picture
    577 on at
    RE: Send E-mail by batch using google SMTP server

    I set the parameter of local computer in E-mail parameters and set allowing access to less secure apps to ON. And, I can send E-mail by dialog (daxture.blogspot.hk/.../send-email-from-ax-using-live-or-gmail.html) but it still does not work by batch. Can anyone help?

  • Tony Mok Profile Picture
    577 on at
    RE: Send E-mail by batch using google SMTP server

    I got stuck a few days. Can anyone help?

  • Verified answer
    Tony Mok Profile Picture
    577 on at
    RE: Send E-mail by batch using google SMTP server

    I finished using SMTP virtual server with a O365 account

    First, set up IIS and SMTP virtual server.

    https://support.office.com/en-us/article/How-to-configure-IIS-for-relay-with-Office-365-eb57abd2-3859-4e79-b721-2ed1f0f579c9

    Second, set up parameters for SMTP virtual server.

    • Open IIS 6.0 Manager.
    • Right click [SMTP Virtual Server #1] under your local computer of Internet Information Services and then click Properties.

    • Under General Tab, click Advanced... button and then add TCP Port 587(no need to set IP Address)

    • Under Access Tab, click Authentication... button and then select Anonymous access
    • Under Access Tab, click Connection... button and then select All except the list below (if you set up SMTP virtual server on the same server of AX). Otherwise, add IP Address(Mask) / Domain Name and select Only the list below.
    • Under Access Tab, click Relay... button and then select All except the list below and also Allow all computers which successfully authenticate to relay regardless of the list above.(if you set up SMTP virtual server on the same server of AX). Otherwise, add IP Address(Mask) / Domain Name and select Only the list below.

    • Under Delivery Tab, click Outbound Security... and then select Basic authentication with your user name(the O365 account, eg. XXX@YYY.onmicrosoft.com) and password. Also select TLS encryption.
    • Under Delivery Tab, click Outbound connections... and then change TCP port to 587
    • Under Delivery Tab, click Outbound advanced... and enter YYY.onmicrosoft.com for Fully-qualified domain name and enter smtp.office365.com for Smart host.

    ... to be continued

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans