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 April 17th, 2004, 06:45 AM
Authorized User
 
Join Date: Mar 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default sending email

hi allz,
i want to tell u that i search the internet for sending email in my site using asp and any free components like cdo or cdonts as i think, and how to configuration the smtp.

today i use this code ( plrase notice that this code is run successfully on the internet ,but on my site it dosent )

<%
If Len(Request.Form("txtEmail")) > 0 then

    Dim objMail
    Set objMail = Server.CreateObject("CDONTS.NewMail")

    objMail.From = "[email protected] (4GuysFromRolla.com)"
    objMail.Subject = "Email attachment demo"
    objMail.AttachFile Server.MapPath("/images/new468x60.gif")
    objMail.To = Request.Form("txtEmail")
    objMail.Body = "This is a demo on sending an email with an attachment."
    objMail.Send

    Response.write("Mail was Sent<p>")

    'You should always do this with CDONTS.
    set objMail = nothing


End If
%>

  <form method="post" id=form1 name=form1>
    Enter your email address:<br>
    <input type="text" name="txtEmail" value="<%=Request.Form("txtEmail")%>">
    <p>
    <input type="submit" value="Send me an Email with an Attachment!" id=submit1 name=submit1>
  </form>

and when i run the page it gives me the following error:

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/asp/testm.asp, line 5

800401f3

so how can i solve this problem and how can i configure the SMTP ?

thanks alot





 
Old April 27th, 2004, 10:23 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi afradoit
Server.CreateObject Failed
this is your server problem which server you are using
please check your SMTP server.

surendran
(Anything is Possible)
 
Old April 28th, 2004, 01:13 AM
Authorized User
 
Join Date: Mar 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi surendran,

thanks for helping.
i'm using windows 2003 enterprise edition.
i donna know how to correct it.

thanks again






Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending EMAIL charleshua BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 16 September 3rd, 2008 12:27 AM
Sending email ironchef Pro JSP 3 February 17th, 2008 11:38 PM
Sending email maitias C# 2005 2 February 17th, 2006 11:24 AM
sending email keyvanjan Classic ASP Components 1 May 9th, 2005 05:56 PM
email sending msrnivas .NET Web Services 6 June 26th, 2004 06:59 AM





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