How to send mail through OE?

  • Thread starter Thread starter Jeti [work]
  • Start date Start date
J

Jeti [work]

....and send it immediatley?

My goal is to send mail, and in the same time save a copy in a "Sent Items"
folder... Or if sending fails - to put that mail into "Outbox" folder...

Any suggestions?
OE APIs?


thank you...
 
Have a look at Simple MAPI. CDO (also known as Extended MAPI) isn't supported
by Outlook Express. You will need to call MAPILogon, MAPISendMail and
MAPILogoff to accomplish want you want.

But, as a start, try using MAPISendDocuments to send a file.

[DllImport("MAPI32.DLL", CharSet=CharSet.Ansi)]
public static extern uint MAPISendDocuments(IntPtr ulUIParam, string
lpszDelimChar, string lpszFullPaths, string lpszFileNames, uint ulReserved);

and then call

string fullFileName = "c:\sample.txt";
MAPISendDocuments(this.Handle, System.IO.Path.PathSeparator.ToString(),
fullFileName, System.IO.Path.GetFileName(fullFileName), 0);

Regards,
Phil.
 
Phil Williams said:
Have a look at Simple MAPI. CDO (also known as Extended MAPI) isn't supported
by Outlook Express. You will need to call MAPILogon, MAPISendMail and
MAPILogoff to accomplish want you want.


Thanks, i will try that!
 
Back
Top