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 NAV (Archived)

Sending mail using C/al

(0) ShareShare
ReportReport
Posted on by 1,392

Hello expets,

when i try to send mail using C/al i got the following Error :

SmtpError.JPG

This is my configuration :

SmtpGmail.JPG

This is the simple Code 

SMTPMailSetup.GET;
MESSAGE(SMTPMailSetup."User ID");
SMTPMail.CreateMessage('test object',SMTPMailSetup."User ID",'metest@gmail.com','test','some text body',FALSE);
SMTPMail.Send;
MESSAGE('Mail Sent');

NB:

SMTPMailSetup ==> record :SMTP Mail Setup
SMTPMail ==> codeunit 400  :SMTP Mail

*This post is locked for comments

I have the same question (0)
  • Tina Menezes Profile Picture
    2,582 on at

    Hi,

    Kindly refer this below link of saurav dhyani to send a mail using CAL code.

    [View:https://saurav-nav.blogspot.in/2013/08/send-mail-with-attachment-from-navision.html?m=1]

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Hello Medo,

    Use Mail Codeunit.

    Mail.NewMessage(..........)

    check the Mail.NewMessage Parameters and then pass, you will get 

  • MedInfoTech Profile Picture
    1,392 on at

    Hello,

    the solution for this issue is third point in this link :

    www.aspsnippets.com/.../GMAIL-Error-The-SMTP-server-requires-a-secure-connection-or-the-client-was-not-authenticated.aspx

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 NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans