Sent Mail held in Drafts Folder

N

Nirmal Singh

I am using Delphi automation to create an email from a template and send it.
s:='myFile.oft';
MailItem.ConnectTo(OutlookApplication1.CreateItemFromTemplate(s) as MailItem);
MailItem.Subject:='Greetings';
SafeMailItem.Item:=MailItem.DefaultInterface;
SafeMailItem.Body:='How are you today? This is version 10';
SafeMailItem.Attachments.Add('c:\boot.ini', olByValue, 1, 'Boot.ini');
SafeMailItem.Recipients.Add(NewAddress);
SafeMailItem.Send;

This all seems to work. However, when I open Outlook, the email is held in the Drafts folder. I then need to send/receive all
to actually send it.

How can I make sure it gets sent by automation?

Nirmal Singh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top