473,661 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 = "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
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.Environm ent.NewLine +
"WeeklyReportUs er" ; // 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_FOUN D(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 1426

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

Similar topics

3
3233
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 of how to use the mapi wrappers) don't ever need to send mail... Of course it could be impossible...
1
2236
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 Application. But when i am trying to run it on remote system i.e., using system name or IP address, its...
13
3211
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 computer and use that? How do I create this functionality without having the user add any other...
1
1942
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 and provided the Profile name. Everything works; but he's still getting the prompt. Now, he...
7
4693
by: mostafa atalla | last post by:
how to send email by MS outlook express using C# code
1
2869
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 from a Windows Forms app from .NET?
7
121665
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
8
2842
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 : ( translated form the dutch language )
14
9886
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
0
8432
marktang
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8758
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7364
agi2029
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.