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 :
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;

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    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

  • Muhammad Arif Maseed Profile Picture
    782 on at

    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,698 Moderator on at

    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!

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Hello,

    You can use the Outlook integration using dotnet variable.

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

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans