473,587 Members | 2,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 = "weeklyreportus er"

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

'create session
Set objSess = Server.CreateOb ject("mapi.sess ion")
objSess.Logon "","", False, True, 0, True, bstrProfileInfo

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

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

'message to
objRecips.Resol ve

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.Environm ent.NewLine +
"WeeklyReportUs er" ; // ProfileInfo

oSession.Logon( argsLogon[0],argsLogon[1],argsLogon[2],argsLogon[3],a

but I get the following error ..

[Collaboration Data Objects - [MAPI_E_NOT_FOUN D(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 1421

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 unfortunately brings up dialog boxes inn various versions of Outlook with security patches etc. It doesn't seem obvious from any documentation and the spambayes classes (which are cited as a good example...
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 coded my outlook login profile. Its working fine as far as running the application in that particular system i.e., where i was developing the...
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 this, it seems, that the user must install IIS on their computer. Isn't there a class that will detect whatever mail server is available on a...
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 automated process. I originally used SendObject. But, according to MS, that doesn't work with Exchange. So, per their note, I changed it to MAPI code...
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 server so I will have to send the e-mail using Simple MAPI. I can't seem to find a way of doing this in .NET as it seems .NET has no MAPI support (amazingly!). How can I reliably send an e-mail...
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. Bye Jacques
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 Now i work in a company with a MS exchange server and would like to send some e-mails however i can`t get it to work at all error is : (...
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' toAddress = 'sridhar_kasturi@satyam.com' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.