473,326 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Sending mail using MAPI

Hi,

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
objRecips.Resolve
objFBMess.Send
objSess.Logoff
%>

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

oSession.Logon(argsLogon[0],argsLogon[1],argsLogon[2],argsLogon[3],a
rgsLogon[4],argsLogon[5],argsLogon[6]);

but I get the following error ..

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

Any help would be gratefully appreciated.

Thanks,
Kevin.

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

Nov 18 '05 #1
0 1412

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

Similar topics

3
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 unfortunately brings up dialog boxes inn various versions...
1
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 instead of sending it. My system are in network. I hard...
13
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 server using the SmtpMail class. However, using...
1
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. That confirmation has to go, as it's part of an...
7
by: mostafa atalla | last post by:
how to send email by MS outlook express using C# code
1
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 server so I will have to send the e-mail using...
7
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 possible, I only have Outlook Express avaliable. ...
8
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 to was a Linux SMTP server and it worked great ...
14
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 fromAddress = 'sridhar_kasturi@satyam.com'...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.