How to set Email Sender from NAV/BC ? (other than from user id in SMTP Setup)

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

Parents
  • There are two ways of sending mails from NAV/BC - either with OUTLOOK or without (called SMTP). If a mail is sent from OUTLOOK then it is possible to have different senders - from SMTP there is only one. And that is the one added to then SMTP Setup page.

    This is for security/Safety reasons. Mostly because sending from SMTP requires a userid and a password. So you can say if you want to send an email with a specific users mail-account then you have to know the password of that user. This is obviously not a good idea.

    You can ofcourse create a new table and a page with different mail-accounts and passwords - but I would strongly advise against it for security reasons.

Reply Children
No Data
Related
Recommended