472,353 Members | 1,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Sending mail using MAPI


I have a web page that will send emails to various addresses, I've tried
using the SmtpMail class but no matter what I try it will not work.

I have an asp page that does actually work using mapi.session...

Const cStrServer = "sciehex01"
Const cStrMailbox = "weeklyreportuser"

'insert a line feed
bstrProfileInfo = cStrServer & vbLf & cStrMailbox

'create session
Set objSess = Server.CreateObject("mapi.session")
objSess.Logon "","", False, True, 0, True, bstrProfileInfo

Set objFBMess = objSess.Outbox.Messages.Add
objFBMess.Subject = "Test Active Messaging"
objFBMess.Text = "Greetings from Active Messaging in ASP"

Set objRecips = objFBMess.Recipients
' e-mail name to send
objRecips.Add ("ke***********@scieh.csa.scot.nhs.uk")

'message to

I am now trying to do the same in an ASP.net page by referencing the
Microsoft 1.21 CDO library.

In my page an error occurs when I try and call the logon method of the
logon method of the mapi.session object using the same variables ....
Object vEmpty = Missing.Value;
Object oResult;

Object [] argsLogon = new Object[7];

MAPI.Session oSession = new MAPI.Session();
bool a = false;
bool b = true;
int c = 0;
bool d = true;
string name = "";
string password = "";

argsLogon[0] = name; // ProfileName
argsLogon[1] = password; // ProfilePassword
argsLogon[2] = a; // ShowDialog
argsLogon[3] = b; // NewSession
argsLogon[4] = c; // ParentWindow
argsLogon[5] = d; // NoMail
argsLogon[6] = "sciehex01" + System.Environment.NewLine +
"WeeklyReportUser" ; // ProfileInfo


but I get the following error ..

[Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]

Any help would be gratefully appreciated.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #1
0 1368

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: David Fraser | last post by:
Hi Does anyone have an idea how to send mail via the win32 mapi extensions that come with pywin32? It's very easy using Simple MAPI, but...
by: Hari | last post by:
Hi all! I am trying to send mail using outlook in my web application. i am using Outlook Express. Actually i am saving it in DRAFTS folder...
by: joe215 | last post by:
I want my users to send emails from a Windows app that I am developing in Visual Basic.NET 2003. I found a good example of sending email to a SMTP...
by: Neil Ginsberg | last post by:
A client of mine is using Outlook (2002, I believe), and is getting prompted for confirmation that another program is sending e-mail in his name....
by: mostafa atalla | last post by:
how to send email by MS outlook express using C# code
by: Nick Gilbert | last post by:
Hi, I'm writing a Windows Forms application in .NET and I need to send an e-mail from it. As it's NOT asp.net, I don't have access to an SMTP...
by: Jacques St-Pierre | last post by:
Hello, I need a simple way to send very simple email via a VB6 code. Anyone know how to do that? Any code avaliable? Without using Outlook if...
by: Michel Posseth [MCP] | last post by:
Hi does someone has experience with this ?? i have made a lot of apps in the past that were capable of sending e-mails the server i then talked...
by: sridhar | last post by:
iam having user account on an exchangeserver. with that can i send an email using python? if iam using the following code iam getting error ...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.