Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 November 13th, 2003, 01:59 AM
Authorized User
 
Join Date: Sep 2003
Location: islamabad, pk, Pakistan.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zaeem Send a message via Yahoo to zaeem
Default sending Email thru ASP Code

Hello Everybody I am using that Code for sending the mail.It executes fine but no email was sent, it won't give me any error as well.Please anybody help me in this regard, I am waiting for ur help to come.
The Code is as follows===
========================================
set objMail = CreateObject("CDONTS.NewMail")
objMailFrom = "t111pk@yahoo.com"
objMailTo = "zaeemabbas@hotmail.com"
objMailSubject = request("subject")
objMailBody=request("message")
Impt=1
objMail.Send objMailFrom,objMailTo,objMailSubject,objMailBody,I mpt
set objMail = Nothing

Zaeem Sherazi
__________________
Zaeem Sherazi
 
Old November 13th, 2003, 03:09 AM
Authorized User
 
Join Date: Jun 2003
Location: Rottum, , Netherlands.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I asume you are using NT server. Is the SMTP service running?
Look in the /inetpub/mailroot folder. Are there any messages in the /badmail folder, then your messages are not "welformed" in some way. When the messages are in the /pickup folder, the smtp server is not running.

Regards,


Gerhard Wentink
 
Old November 13th, 2003, 03:33 AM
Authorized User
 
Join Date: Sep 2003
Location: islamabad, pk, Pakistan.
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to zaeem Send a message via Yahoo to zaeem
Default

thanx for ur quick reply. Yea my email messages are Pickup folder in the mail root. Now What I can do to send these messages? I'll be thankful to u for helping u.
I am expecting the same act of kindness fromu again.
Bye

Zaeem Sherazi
 
Old November 13th, 2003, 08:17 AM
Authorized User
 
Join Date: Jun 2003
Location: Rottum, , Netherlands.
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok. First lets check if the SMTP server is installed:
Open Control Panel>Add/remove programs. Click Add/Remove Windows Components. Select Internet Information Services (IIS) and click "Details" Is the checkbox in front of SMTP service checked? If not do so, and the service will be installed.
If the service was installed before (when the checkbox is checked): Go to Control Panel> Administrative Tools>services. See if the startup type of the "Simple Mail Transport Protocol (SMTP)" is "Automatic" If not make it so by rightclicking the service and selecting "properties". Start the service (right click > all task >start)

Regards



Gerhard Wentink
 
Old November 13th, 2003, 04:03 PM
Friend of Wrox
 
Join Date: Aug 2003
Location: Halifax, Nova Scotia, Canada.
Posts: 166
Thanks: 0
Thanked 0 Times in 0 Posts
Default

<%

Session("Name") = Request.Form("Name")

    Set MailObj = CreateObject("CDONTS.NewMail")

    strEmail="enter Email here"
    newstr="Name: " & Session("Name") & chr(13) & chr(10)
    MailObj.BodyFormat=1

    MailObj.From=strEmail
    MailObj.Importance=1

    MailObj.Subject="Form Name"
    MailObj.Body=newstr
    MailObj.To="Enter Email"

    MailObj.Send
    Set MailObj = Nothing
    'Session.Abandon
%>
<form METHOD="POST" ACTION="handler.asp" id=form1 name=form1>

I linked my form to Handler.asp, this is the code I used and it works fine. The example above is for a form with one Input box called "name" add other input boxes as needed. I hope this helps







Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Sending an email in asp.net 2.0 using C# Bashu C# 2005 4 August 14th, 2007 03:29 AM
code for Sending Email in jsp mhadz JSP Basics 0 January 12th, 2007 03:55 AM
Sending email from asp page stephens1982 Classic ASP Databases 6 August 25th, 2005 01:05 PM
sending email in code xchemicalbeatz VB.NET 2002/2003 Basics 12 June 3rd, 2005 01:46 PM





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