M
madfisher
Hi,
I am trying to send an email with MAP via C# and ASP.NET. This is what
I'm doing.
MapiSession1 = new MSMAPI.MAPISessionClass();
MapiSession1.UserName = "OutlookProfileName";
MapiSession1.Password = "pass";
MapiSession1.LogonUI = false;
MapiSession1.SignOn();
MapiSession1.NewSession = true;
MapiMessages1 = new MSMAPI.MAPIMessagesClass();
MapiMessages1.SessionID = MapiSession1.SessionID;
MapiMessages1.Compose();
MapiMessages1.RecipAddress = "(e-mail address removed)";
MapiMessages1.MsgSubject = "New Build Requested";
MapiMessages1.MsgNoteText = "A new build has been requested.";
MapiMessages1.Send(null);
MapiSession1.SignOff();
I'm getting the following error:
System.Runtime.InteropServices.COMException: Login has failed
I'm am using my Outlook (Exchange profile info) which should be right.
Am I going about this the right way?
Thanks in advance.
Marcus de Leon
I am trying to send an email with MAP via C# and ASP.NET. This is what
I'm doing.
MapiSession1 = new MSMAPI.MAPISessionClass();
MapiSession1.UserName = "OutlookProfileName";
MapiSession1.Password = "pass";
MapiSession1.LogonUI = false;
MapiSession1.SignOn();
MapiSession1.NewSession = true;
MapiMessages1 = new MSMAPI.MAPIMessagesClass();
MapiMessages1.SessionID = MapiSession1.SessionID;
MapiMessages1.Compose();
MapiMessages1.RecipAddress = "(e-mail address removed)";
MapiMessages1.MsgSubject = "New Build Requested";
MapiMessages1.MsgNoteText = "A new build has been requested.";
MapiMessages1.Send(null);
MapiSession1.SignOff();
I'm getting the following error:
System.Runtime.InteropServices.COMException: Login has failed
I'm am using my Outlook (Exchange profile info) which should be right.
Am I going about this the right way?
Thanks in advance.
Marcus de Leon