p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Basics (http://p2p.wrox.com/forumdisplay.php?f=61)
-   -   sending Email thru ASP Code (http://p2p.wrox.com/showthread.php?t=6114)

zaeem November 13th, 2003 01:59 AM

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")
objMail.Send objMailFrom,objMailTo,objMailSubject,objMailBody,I mpt
set objMail = Nothing

Zaeem Sherazi

Gerhard November 13th, 2003 03:09 AM

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.


Gerhard Wentink

zaeem November 13th, 2003 03:33 AM

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.

Zaeem Sherazi

Gerhard November 13th, 2003 08:17 AM

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)


Gerhard Wentink

morpheus November 13th, 2003 04:03 PM


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

    Set MailObj = CreateObject("CDONTS.NewMail")

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


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

    Set MailObj = Nothing
<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

All times are GMT -4. The time now is 01:14 PM.

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