Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
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
Reply With Quote
  #4 (permalink)  
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
Reply With Quote
  #5 (permalink)  
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



Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:58 PM.


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