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 September 21st, 2004, 07:20 AM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default Sending Email using CDOSYS in ASP

I have windows xp and i am trying to send email in asp page using cdo.message
my code is as followes:

<%
set iMsg = CreateObject("CDO.Message")
iMsg.From ="AA"
iMsg.To = "[email protected]"
iMsg.Subject= "test mail"
iMsg.TextBody ="test mail"

iMsg.Send

Set iMsg = Nothing
%>


and it gives my the following error

Error Type:
CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid.
/mail.asp, line 8

what does this error means and how can i remove it
The Following User Says Thank You to asplearner For This Useful Post:
ashokp (July 15th, 2009)
 
Old September 21st, 2004, 09:05 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had the same problem... :( I haven`t solve this yet! I know that you have to specify something about the SMTP server. But even when you`ll do that then a different error will occur.

Search in here...
http://support.microsoft.com/default...b;EN-US;816789

Please... If you find the solution to that problem send me an e-mail withe what you did. :) Also I`ll post the solution if i`ll find it before you!

If you want you can e-mail me. [email protected]
 
Old September 29th, 2004, 12:11 AM
Registered User
 
Join Date: Sep 2004
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi!

I have used the following code and now its working perfectly.

<%
Set objEMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Confi = objConfig.Fields
Confi("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Confi("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\inetpub\mailroot\pickup"
Confi.Update
Set objEMail.Configuration = objConfig
objEMail.To = "[email protected]"
objEMail.From = "[email protected]"
objEMail.Subject = "Test"
objEMail.TextBody = "This is a test mail"
objEMail.Send
Set objEMail = Nothing

Response.Write("Message Sent")
%>

Try the same and hope your prob will also get solved.


 
Old October 29th, 2004, 06:00 AM
Registered User
 
Join Date: Oct 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you. This script worked very well for me.

 
Old January 27th, 2005, 07:14 PM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to boxenberg Send a message via MSN to boxenberg
Default

Hi,
How would one go about including dynamic values, say form field values, in the body of the e-mail message?
Quote:
quote:Originally posted by asplearner
 Hi!

I have used the following code and now its working perfectly.

<%
Set objEMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Confi = objConfig.Fields
Confi("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Confi("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\inetpub\mailroot\pickup"
Confi.Update
Set objEMail.Configuration = objConfig
objEMail.To = "[email protected]"
objEMail.From = "[email protected]"
objEMail.Subject = "Test"
objEMail.TextBody = "This is a test mail"
objEMail.Send
Set objEMail = Nothing

Response.Write("Message Sent")
%>

Try the same and hope your prob will also get solved.


 
Old February 16th, 2005, 02:43 AM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by asplearner
 I have windows xp and i am trying to send email in asp page using cdo.message
my code is as followes:

<%
set iMsg = CreateObject("CDO.Message")
iMsg.From ="AA"
iMsg.To = "[email protected]"
iMsg.Subject= "test mail"
iMsg.TextBody ="test mail"

iMsg.Send

Set iMsg = Nothing
%>


and it gives my the following error

Error Type:
CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid.
/mail.asp, line 8

what does this error means and how can i remove it
 
Old February 16th, 2005, 02:48 AM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi ,

i'ave tried that solution but the thing is that i'm getting message sent message
but the mail is received in my mail account.
what might be the problem ?how to solve it?


<%
Set objEMail = Server.CreateObject("CDO.Message")
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Confi = objConfig.Fields
Confi("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
Confi("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "C:\inetpub\mailroot\pickup"
Confi.Update
Set objEMail.Configuration = objConfig
objEMail.To = "[email protected]"
objEMail.From = "[email protected]"
objEMail.Subject = "Test"
objEMail.TextBody = "This is a test mail"
objEMail.Send
Set objEMail = Nothing

Response.Write("Message Sent")
%>








Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Mail Using CDOSYS in ASP artarasan Classic ASP Basics 1 May 12th, 2008 06:11 PM
How to Sending an email in asp.net 2.0 using C# Bashu C# 2005 4 August 14th, 2007 03:29 AM





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