Hello,
I need to send an order acknowledgment e-mail from the sales order form-- to do this I'm using the Mail Codeunit (397); the process has to be transparent, this is why I've set the OpenDialog flag to false. The problem is that instead of sending the e-mails, outlook is saving them to the draft folder. What am I doing wrong, why are the e-mails not sent?
The environment is: Windows XP SP2, Navision 4.00 SP3 and Microsoft Outlook 2007.
Sent := Mail.NewMessage(Customer."E-Mail",'',Subject,Body,'',FALSE)
Thanks
Answers
Is the ErrorNo (in the function itself) giving you any value?
What is you add an extra line:
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
The value of "Sent" is Yes/True. If I ignore the "Sent" variable and call the GetErrorCode or GetErrorDesc() functions I get the following error:
"Integer must not be blank.
Integer is missing or invalid in the expression."
Activating the debugger I've learned that the error comes from the Get functions in the codeunit. I also modified the Mail codeunit to print the error code before exiting the NewMessage function, it prints "0".
Tried to do it with dialog and push the send button manually?
Eric Wauters
MVP - Microsoft Dynamics NAV
My blog
"Boolean must not be blank.
Boolean is missing or invalid in the expression."
and the e-mail is still saved to my draft folder.
In your Outlook office client, activate Automatic Send/Receive
for every 2 mints
Senior Consultan
I want to create a number of mails but I don´t want them to be send or opened but to be saved in the draftfolder.
If I set the OpenDialog to True I get 100 (or so) open mails, If I set the OpenDialog to False all the mails will be send automatical.
should I use the mail management codunit 6229 instead? Using this codeunit I just cant see how to attach files or make a bodytext.