?
Solved

ASP and MAPI

Posted on 1999-06-28
3
Medium Priority
?
174 Views
Last Modified: 2013-12-25
How can I send email through MS-Exchange in ASP ?

What is the problem in the following code ?

Set objSession=Server.CreateObject("MAPI.Session")
objSession.Logon "Profile Name", "password", False, True, 0, False, "mailserver" & chr(10) & "andrew.yu"
Set objMessage = objSession.Outbox.Messages.Add
objMessage.Subject="Subject"
objMessage.Text="Body"
Set objonerecip=objmessage.Recipients.Add
objonerecip.Name="someone@testserver.com"
objMessage.Send
objSession.Logoff

Andrew
0
Comment
Question by:andrewyu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
nikhilh earned 40 total points
ID: 1834788
<%
Sub email_to
      Set objMail = CreateObject("CDONTS.Newmail")
      objMail.From = "Me(me@testserver.com)"
      objMail.To = "myaddress@testserver.com"
      objMail.Subject = "Test Mail"
      objMail.Body = "Hi"
      objMail.Send
      Set objMail = Nothing%>

Try using this kind of script
0
 

Author Comment

by:andrewyu
ID: 1834789
Does this procedure need anymore extra setting, like specify the SMTP or exchange server ?

Andrew
0
 

Author Comment

by:andrewyu
ID: 1834790
By the way, can anyone tell me what is the problem in the ASP segment ?

Andrew
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question