Hi,
I'm trying to generate e-mail with digital signature attached, i've two accounts setup on my Outlook and one of them uses the digital signature. I'm using the following code :
IF ISCLEAR(OutlookApp) THEN
CREATE(OutlookApp);
OutlookMsg := OutlookApp.CreateItem(0);
OutlookMsg."To"(SendTo);
OutlookMsg.Subject(Subject);
OutlookMsg.Body(Body);
OutlookAttachs := OutlookMsg.Attachments;
OutlookAttachs.Add(AttachPath);
OutlookMsg.SentOnBehalfOfName(SendFrom);
OutlookMsg.Send;
It happens that the sender e-mail always get the default e-mail account. How can i set the sender e-mail account?
Or there is any other way to send e-mail with digital signature from Navision?
Best Regards,
Thank you for your help.
0
Comments
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
Best Regards,
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
IF ISCLEAR(OutlookApp) THEN
CREATE(OutlookApp);
OutlookMsg := OutlookApp.CreateItem(0);
OutlookMsg."To"(SendTo);
OutlookMsg.Subject(Subject);
OutlookMsg.Body(Body);
OutlookAttachs := OutlookMsg.Attachments;
OutlookAttachs.Add(AttachPath);
FOR l_intCount := 1 TO OutlookApp.Session.Accounts.Count DO BEGIN
OutlookAccount := OutlookApp.Session.Accounts.Item(l_intCount);
IF UPPERCASE(OutlookAccount.DisplayName) = UPPERCASE(SendFrom) THEN BEGIN
OutlookMsg.SendUsingAccount := OutlookAccount;
END;
END;
OutlookMsg.Send;
Best Regards,
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
Could you help me?