Skip to main content

Notifications

Announcements

No record found.

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

SMTP Mail

Posted on by 768

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
    Binesh 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
    Nitin Verma 21,091 Super User 2024 Season 1 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!

  • 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
    Nitin Verma 21,091 Super User 2024 Season 1 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans