Print Page | Close Window

need help in smtp asp mail send

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=16078
Printed Date: 30 March 2026 at 5:05am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: need help in smtp asp mail send
Posted By: thebmwz4
Subject: need help in smtp asp mail send
Date Posted: 03 August 2005 at 10:09pm
Hi all, my first post. yeah
ok, i am dtg an Online System using Asp w Sqlpserver2k for my project. i am trying to test out a script  to enable my system to send email. however , there is this error :
  • Error Type:
    (0x8004020F)
    /sendEmail.asp, line 42
  • can i request help in solving this mystery? thanks!

    ***********the script*******************
     

    <!--#include file="connectDB.asp"-->

     

    <% ' send email to Requester using external smtp server using cdo

    CONST SMTPServer = "localhost"

    CONST cdoURL = "http://schemas.microsoft.com/cdo/configuration/"

    HTML = HTML & "<HTML>"

    HTML = HTML & "<BODY>"

    HTML = HTML & "<P>This Email is sent to you by james. </P>"

     

    HTML = HTML & "<P>For your info. thank you. <BR>"

    HTML = HTML & " System</P>"

    HTML = HTML & "<P>(This is an auto generated Email. Please do not reply to this message.)</P>"

    'HTML = HTML & "</HTML>"subject = "Smtp email test:""</HTML>

    HTML = HTML & "<P>For your info. please, thank you. <BR>"

    HTML = HTML & "</HTML>"

    HTML = HTML & "Online System</P>"

    HTML = HTML & "<P>(This is an auto generated Email. Please do not reply to this message.)</P>"

    HTML = HTML & "</BODY>"

    HTML = HTML & "</HTML>"

    subject = "Testing mail sending"

    set cdoM = CreateObject("CDO.Message")

    set cdoC = CreateObject("CDO.Configuration")

    Set cdoF = cdoC.Fields

    With cdoF

    .Item(cdoURL & "sendusing") = 2

    .Item(cdoURL & "smtpserver") = SMTPServer

    .Item(cdoURL & "smtpconnectiontimeout") = 20

    .Update

    End With

    With cdoM

    Set .Configuration = cdoC

    .From = "thebmwz4@yahoo.com"

    .To = "thebmwz4@yahoo.com"

    .Subject = Subject

    .HTMLBody = HTML

    .Send        ******problem appears to be here when i load this script

    End With

    Set cdoM = Nothing

    Set cdoS = Nothing

    Set cdoF = Nothing %>

     





    Replies:
    Posted By: Phat
    Date Posted: 03 August 2005 at 10:25pm
    what is line number 42?

    -------------
    http://buildit.sitesell.com/sitebuildithome.html - Get a website that sells


    Posted By: thebmwz4
    Date Posted: 03 August 2005 at 10:27pm
    hi , line 42 is

    .Send        ******problem appears to be here when i load this script

    the error says is the .send
    :)


    Posted By: theSCIENTIST
    Date Posted: 04 August 2005 at 1:16am
    Yes, is the [.send] because it's at that point the other stuff is properly checked, but the error is not there.

    You have so much code you don't need, try this as a test:

    <!--#include file="connectDB.asp"-->
    

    <%
    HTML = "<P>This Email is sent to you by james.</P>"
    subject = "Testing mail sending"

    set cdoM = CreateObject("CDO.Message")

    With cdoM

    .From = "thebmwz4@yahoo.com"
    .To = "thebmwz4@yahoo.com"
    .Subject = Subject
    .HTMLBody = HTML
    .Send

    End With

    Set cdoM = Nothing
    %>



    -------------
    :: http://www.mylittlehost.com/ - www.mylittlehost.com


    Posted By: thebmwz4
    Date Posted: 04 August 2005 at 4:12am

    Hi theSCIENTIST, thanks a million for ur help!

    yea, me a greenhorn 'programmer', still thanks!

    :)



    Print Page | Close Window

    Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
    Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net