Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

SMTP Mail

(0) ShareShare
ReportReport
Posted on by 782

Hello,

I am working with SMTP mail. i am sending posted sales invoice using SMTP mail it is working fine. But it not showing the Dialog box i want to open the dialog before send the email.

this is what i tried and its working fine just want to open the dialog before sending the email


SmtpMail.CreateMessage(SMTPSetup."User ID",SMTPSetup."User ID",SMTPSetup."User ID",'Email With Signature','',TRUE);
SmtpMail.AddAttachment(FilePath,'salesinvoice.pdf');
SmtpMail.AppendBody('Hi All, <BR><BR>');
SmtpMail.AppendBody('This is test<BR><BR>');
SmtpMail.AppendBody('<HR>');
SmtpMail.AppendBody('<BR>');
SmtpMail.AppendBody('Regards,<BR>');
SmtpMail.AppendBody('M Arif<BR>');
SmtpMail.AppendBody('New- Cronus International<BR>');

CompanyInfo.CALCFIELDS(Picture);
IF CompanyInfo.Picture.HASVALUE THEN BEGIN
TempBlob.INIT;
TempBlob.Blob := CompanyInfo.Picture;
TempBlob.INSERT;
FileName := FileManagment.BLOBExport(TempBlob,'Signature.jpg',FALSE);
END;
SmtpMail.AppendBody('<IMG style="HEIGHT: 153px; WIDTH: 445px" src="file:///'+ FileName +'"'+ 'width=100 height=100>');
SmtpMail.Send;

  • Suggested answer
    Binesh Profile Picture
    7,885 on at
    RE: SMTP Mail

    Hello,

    You can use the Outlook integration using dotnet variable.

    See the reference Outlook Attachment & Send in NAV Using Dotnet Variables

  • Suggested answer
    Nitin Verma Profile Picture
    21,548 Moderator on at
    RE: SMTP Mail

    Ok, There is Page ID 9700, You have to call this page, You can take help from Codeunit 9520 Email Management by using RunDialog function.

    Please dig out more on this.

    Cheers!

  • Muhammad Arif Maseed Profile Picture
    782 on at
    RE: SMTP Mail

    I am using Nav 2017 yes i know the default functionality but i am trying with custom email body witch include company logo that's why i chose smtp

    It is working for me only as i click on action it send email not showing the dialog i want to show the dialog before send the email

  • Suggested answer
    Nitin Verma Profile Picture
    21,548 Moderator on at
    RE: SMTP Mail

    Please mention which version you are using

    As per NAV 2016 you can create your own email profile and set it with the report after SMTP Mail setup done.

    Click On Posted Sales Invoice > Email Button (this is default functionality of NAV) no need to write custom code. Hope it will help you.

    pastedimage1591024043147v1.png

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,200

#2
YUN ZHU Profile Picture

YUN ZHU 1,006 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 836

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans