I've noticed the same behaviour. I have been using the function NewMessage in cdu 397 since version 3.60 and in version 4.0 SP2 (I haven't tested all 4.0-versions) this function behaves differently like Alisha found out: mails are not send (or at least placed in Oubox) but remain in de Draftsfolder.
I'm not sure what Mark means by putting the Send option to TRUE, because i don't think that you can do this in this function.
I have send this as a request to Microsoftsupport.
An Outlooksetting causes this behaviour. In Outlook select Tools, Options, E-Mail Options, Advanced E-Mail Options.
You can now choose the default folder for unsent mail.
When sending mail from Navision through Cdu 397 (Mail) this setting is used.
If you have the setup so that unsent mail goes into the draft folder then irrespective of this , within 2 seconds it is passed to the Sent Items folder.
It only waits in the 'draft' folder for a short time.
Using Outlook 2003 the email goes to Drafts for a few seconds then gets moved to Sent Items but using Outlook 2007 the email is sent but remains in the Drafts folder.
Originally the code was written in 4.01 but I've tried it using v5 with the same effect.
Microsoft released a new version of the OLHandler.dll for this. According to my information this new dll should be available in 5.0, but i haven't tested it yet.
I found this when doing some testing on some work I had recently completed.
On investigation i found that going into my outlook options>Mail set up>set up email accounts and directories>view or change existing account>select the account and change
There is a setting there... Use cached exchange mode.
When ticked my mails go into draft, when unticked they are sent immediately #-o
Took a bit of working out.....but I found it by comparing an email account that worked and mine.
Comments
Otherwise it will just leave it in drafts.
MailSent := mail.NewMessage(ToName,CCName,Subject,Body,AttachFileName,OpenDialog)
where should I indicate the option SEND?
The message is sent, but it remains in Drafts.
I'm not sure what Mark means by putting the Send option to TRUE, because i don't think that you can do this in this function.
I have send this as a request to Microsoftsupport.
I'll let you know.
Hans
An Outlooksetting causes this behaviour. In Outlook select Tools, Options, E-Mail Options, Advanced E-Mail Options.
You can now choose the default folder for unsent mail.
When sending mail from Navision through Cdu 397 (Mail) this setting is used.
If you have the setup so that unsent mail goes into the draft folder then irrespective of this , within 2 seconds it is passed to the Sent Items folder.
It only waits in the 'draft' folder for a short time.
Hans
If my thoughts are correct, you won't see this error on Office XP, Office 2003 SP2 (and maybe prior versions).
Maybe it's all because of OLHandler.dll, unfortunately can't say for sure.
I've encoutered the same problem.
Using Outlook 2003 the email goes to Drafts for a few seconds then gets moved to Sent Items but using Outlook 2007 the email is sent but remains in the Drafts folder.
Originally the code was written in 4.01 but I've tried it using v5 with the same effect.
Hans
On investigation i found that going into my outlook options>Mail set up>set up email accounts and directories>view or change existing account>select the account and change
There is a setting there... Use cached exchange mode.
When ticked my mails go into draft, when unticked they are sent immediately #-o
Took a bit of working out.....but I found it by comparing an email account that worked and mine.
Tim