Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - need help in smtp asp mail send
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

need help in smtp asp mail send

 Post Reply Post Reply
Author
thebmwz4 View Drop Down
Newbie
Newbie


Joined: 17 June 2005
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote thebmwz4 Quote  Post ReplyReply Direct Link To This Post Topic: need help in smtp asp mail send
    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 %>

     


    Back to Top
    Phat View Drop Down
    Senior Member
    Senior Member


    Joined: 23 February 2003
    Status: Offline
    Points: 386
    Post Options Post Options   Thanks (0) Thanks(0)   Quote Phat Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2005 at 10:25pm
    what is line number 42?
    Back to Top
    thebmwz4 View Drop Down
    Newbie
    Newbie


    Joined: 17 June 2005
    Status: Offline
    Points: 14
    Post Options Post Options   Thanks (0) Thanks(0)   Quote thebmwz4 Quote  Post ReplyReply Direct Link To This Post 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
    :)
    Back to Top
    theSCIENTIST View Drop Down
    Senior Member
    Senior Member


    Joined: 31 July 2003
    Location: United Kingdom
    Status: Offline
    Points: 440
    Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post 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
    %>

    Back to Top
    thebmwz4 View Drop Down
    Newbie
    Newbie


    Joined: 17 June 2005
    Status: Offline
    Points: 14
    Post Options Post Options   Thanks (0) Thanks(0)   Quote thebmwz4 Quote  Post ReplyReply Direct Link To This Post Posted: 04 August 2005 at 4:12am

    Hi theSCIENTIST, thanks a million for ur help!

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

    :)
    Back to Top
     Post Reply Post Reply

    Forum Jump Forum Permissions View Drop Down

    Forum Software by Web Wiz Forums® version 12.08
    Copyright ©2001-2026 Web Wiz Ltd.


    Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
    About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

    Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
    Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

    Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

    Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.