Wrox Programmer Forums
|
ASP CDO As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP CDO section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 21st, 2004, 12:08 PM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sending mail with CDOEX

I've been searching around for a few weeks trying to find a "for idiots" tutorial on how to use CDOEX, as all I want to do is send a simple e-mail. I'm developing an intranet application for a company that uses active directory and exchange server (I think 2000), and all I need to do is send simple email messages. The problem I seem to be having is that I can't figure how to find the URL for a user's mailbox. The code I'm using is:
Code:
submit = Request.Form.Item("B1")

if submit = "Send" then
Dim iMsg
'Create the message object
Set iMsg = CreateObject("CDO.Message")
Dim iConf
'Create the configuration object
Set iConf = CreateObject("CDO.Configuration")
Dim Flds
'Set the fields of the configuration object to send using exchange server
Set Flds = iConf.Fields
Flds( "http://schemas.microsoft.com/cdo/configuration/sendusing") = 3
Flds.Update
'Set the message to,from,subject,body properties.
Set iMsg.Configuration = iConf
iMsg.To = Request.Form.Item("Text1")
iMsg.From = "<my email address>"
iMsg.Subject = Request.Form.Item("Text3")
iMsg.TextBody = Request.Form.Item("TextArea1")
iMsg.Send

end if
Using that code, I get this error:

Error Type:
CDO.Message.1 (0x80040233)
Could not find the Sender's mailbox.
/NewMail.asp, line 24

Line 24 is the .Send command.

How can I find a user's mailbox, given their logon name, domain, and email address?
 
Old January 21st, 2004, 01:33 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Why do you need an URL to user's mailbox? Which user are you referring to?

If all you need to do is send an e-mail, using CDO should do the trick.

Do you have a SMTP server running on the machine that tries to send the message?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old January 21st, 2004, 02:46 PM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm using CDOEX, which is CDO for Exchange Server, which I would think means that there are no SMTP servers involved, the mail is just sent using the Exchange server. The thing is, there are about 10 Exchange servers on my network to accomodate all the users. I'm trying to use my account to send email, and I know which server my account uses, but I'm not sure where to go from there.

 
Old January 21st, 2004, 03:05 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Well, true. But if there *is* a local SMTP server, this should also send your e-mail:
Code:
Dim objMsg
Set objMsg = CreateObject("CDO.Message")
With objMsg
  .To = """Your To Name"" <Your To Address>"
  .BCC = """Your BCC Name"" <Your BCC Address>"
  .From = """Your From Name"" <Your From Address>"
  .Subject = "Your Subject"
  .TextBody = "The Body of the Message"
  .Send
End With
Set objMsg = Nothing
This code will send the message to the localhost, so it needs to be running an SMTP server that is set up to send the message directly, or relay it to one of your exchange servers.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 21st, 2005, 02:06 AM
Registered User
 
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I currently facing the same problem....Where the following error msg
Error Type:
CDO.Message.1 (0x80040233)
Could not find the Sender's mailbox.

I try various e-mail address but still cant solve it.

Is SMTP virtual Server included in the IIS 5.1 in winXp support the CDO object? And also if support, what is the domain name for the sender's mailbox??????????






Similar Threads
Thread Thread Starter Forum Replies Last Post
mail sending PHP FAQs 0 April 2nd, 2007 06:43 AM
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
sending mail anita VB How-To 3 September 30th, 2004 03:48 PM
Sending e-mail to different mail box! Calibus Classic ASP Databases 4 September 3rd, 2004 05:48 PM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.