MAPI control with C# causes exception when calling Send()



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= "email@xxxxxxxxxxx";
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#?

.



Relevant Pages

  • Re: OWA and missing attachments
    ... The sender was an Exchange Outlook 2003 Client in LAN, ... If you have Trend Microsoft SMTP Gateway installed, ...
    (microsoft.public.windows.server.sbs)
  • Re: Global Address Book Update
    ... >>> outlook 2003 on a Windows 2000 clients using RPC over HTTP. ... Bring up ESM, Recipients, Offline Address Lists. ... On the Outlook client ... >>> updates the Offline Address Book on the client every 24 hours. ...
    (microsoft.public.windows.server.sbs)
  • RE: email wont download
    ... On the SBS 2003 Server open the Server Management console. ... Configure the problematic Outlook client to connect Exchange ...
    (microsoft.public.windows.server.sbs)
  • Re: Faxing From Outlook Problem
    ... When you send fax email in Outlook client, the fax email will be send to ... Microsoft CSS Online Newsgroup Support ... This newsgroup only focuses on SBS technical issues. ...
    (microsoft.public.windows.server.sbs)
  • Re: Shared fax
    ... I tried on one workstation to install an outlook 2003 and connected to the ... > What is your client computer's Outlook version? ... > Integration\Windows Small Business Server 2003\Logs''. ...
    (microsoft.public.windows.server.sbs)

Loading