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

Related
Recommended