Dynamic Email Sender from NAV/BC

julkifli33julkifli33 Member Posts: 1,092
edited 2019-01-19 in NAV Three Tier
Hi All,
how to send email notification from dynamic senders instead of Admin email pulled from SMTP Mail setup
SMTPSetup.GET;
SMTPMail.CreateMessage
          ('NAV Admin',
          'Whoeversendthis@myemail.com', //Sender
          'Recipient@gmail.com', //Recipient
          'Test Send Email',
          'Hi This is only for testing',
          TRUE);

SMTPMail.Send;
this is my code.
at the sender part usually I pulled from SMTPsetup."user id".
but i need to pull from other email
can we do that?

Thanks

Answers

  • aripermadiaripermadi Member Posts: 9
    Yes, you can setup multiple Email in SMTP mail setup then for NAV 2018 and below , make below changes in codeunit 400.
    h6id4y8o36y4.png

    it will then get the setting based on the sender.

    But for 365 BC, you will need to check whether there is a standard event for you to call in your extension as i have not checked on this version.
  • julkifli33julkifli33 Member Posts: 1,092
    Hi aripermadi , thanks for the reply. ok noted. I dont think there is standard event.
    but as long as can do this way is good enough.
    Thanks a lot.
  • julkifli33julkifli33 Member Posts: 1,092
    Hi aripermadi, but it doesnt work.
    still has error message
Sign In or Register to comment.