Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components 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 May 19th, 2007, 12:15 AM
Authorized User
 
Join Date: Oct 2006
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default CDOSYS Error

I am trying to send an email using CDOSYS with classic ASP. But I am getting this error:

Code:
CDO.Message.1 error '80040220'

The "SendUsing" configuration value is invalid.

/send.asp, line 8

line1     <%
line2     Dim myMail
line3     Set myMail=CreateObject("CDO.Message")
line4     myMail.Subject="Sending email with CDO"
line5     myMail.From="[email protected]"
line6     myMail.To="[email protected]"
line7     myMail.TextBody="This is a message."
line8     myMail.Send
line9     set myMail=nothing
line10    %>

Can anyone plz help?

Thanx

-----------------------------------------------
www.chargertek.in - Cheapest WebHosting
__________________
-----------------------------------------------
www.chargertek.in - Cheapest WebHosting
 
Old May 21st, 2007, 10:53 PM
Authorized User
 
Join Date: May 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi cancer10,

Looks like you need to configure your CDOSYS first.. Grabbed an example from http://classicasp.aspfaq.com/email/h...-with-cdo.html

<%
    sch = "http://schemas.microsoft.com/cdo/configuration/"

    Set cdoConfig = CreateObject("CDO.Configuration")

    With cdoConfig.Fields
        .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
        .Item(sch & "smtpserver") = "<enter_mail.server_here>"
        .update
    End With

    Set cdoMessage = CreateObject("CDO.Message")

    With cdoMessage
        Set .Configuration = cdoConfig
        .From = "[email protected]"
        .To = "[email protected]"
        .Subject = "Sample CDO Message"
        .TextBody = "This is a test for CDO.message"
        .Send
    End With

    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
%>

Hasta Luego..
KingRoon

DogFightClothing. No dogs. No fighting.
http://www.dogfightclothing.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
CDOSYS Mail component error shrisangeeta Classic ASP Basics 1 May 5th, 2007 06:01 AM
CDONTS to CDOSYS icis Classic ASP Basics 1 March 2nd, 2006 06:27 PM
CDOSYS Bob Bedell Pro VB 6 1 February 14th, 2006 10:16 AM
How do you use CDOSYS mail SoC Classic ASP Basics 5 April 20th, 2005 10:56 PM





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