D
Drew
Real simple code:
MSMAPI.MAPISessionClass session = new MSMAPI.MAPISessionClass();
session.SignOn();
if (session.SessionID != 0)
{
MSMAPI.MAPIMessagesClass message = new MSMAPI.MAPIMessagesClass();
message.SessionID = session.SessionID;
message.Compose();
message.RecipType = (short)MSMAPI.RecipTypeConstants.mapToList;
message.RecipAddress= "(e-mail address removed)";
message.MsgSubject = issue.Type;
message.MsgNoteText = issue.Description;
message.Send(true);
session.SignOff();
}
When my default client is Outlook Express, it works fine. When I change
my default client to Outlook, I get this exception:
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in
IssueReporter.exe
Additional information: Unspecified Failure has occurred
I had this same code running in managed C++. Anyone know of any fixes
for C#?
MSMAPI.MAPISessionClass session = new MSMAPI.MAPISessionClass();
session.SignOn();
if (session.SessionID != 0)
{
MSMAPI.MAPIMessagesClass message = new MSMAPI.MAPIMessagesClass();
message.SessionID = session.SessionID;
message.Compose();
message.RecipType = (short)MSMAPI.RecipTypeConstants.mapToList;
message.RecipAddress= "(e-mail address removed)";
message.MsgSubject = issue.Type;
message.MsgNoteText = issue.Description;
message.Send(true);
session.SignOff();
}
When my default client is Outlook Express, it works fine. When I change
my default client to Outlook, I get this exception:
An unhandled exception of type
'System.Runtime.InteropServices.COMException' occurred in
IssueReporter.exe
Additional information: Unspecified Failure has occurred
I had this same code running in managed C++. Anyone know of any fixes
for C#?