I am writing a c# .net application that needs to send email messages using MAPI. I am using the following library to achieve this http://www.codeproject.com/KB/IP/SendFileToNET.aspx Here is an example how I use it.
MAPI mapi = new MAPI();
mapi.AddRecipientTo("[email protected]");
int returncode = mapi.SendMailPopup("subject", "message");
if(returncode==0)
{
MessageBox.Show("User sent message");
}
else if (returncode==1)
{
MessageBox.Show("User abort");
}
This piece of code opens a new message dialog on default mail program and should display if user decided to send or abort sending the email.
This code works fine when using Outlook meaning that it popups a new email dialog and returns the correct error code if user for example decides not to send the message by closing the message dialog.
The problem is that when using windows mail this does not work correctly. The send mail dialog opens correctly and the application pauses its execution on mapi.SendMailPopup until the mail dialog is closed. However no matter what the user does the mapi.SendMailPopup always return zero. If user would for example decide to close the message dialog without sending the message the mapi.SendMailPopup returns 0 when the correct response would be 1(user abort).
My question is should windows live mail have required MAPI-support for this, and if no can someone tell me some other free windows mail client that would offer the required MAPI-support