Subject: sending Email thru ASP Code
Posted By: zaeem Post Date: 11/13/2003 12:59:45 AM
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,Impt
set objMail = Nothing

Zaeem Sherazi
Reply By: Gerhard Reply Date: 11/13/2003 2:09:02 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.

Regards,


Gerhard Wentink
Reply By: zaeem Reply Date: 11/13/2003 2:33:57 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.
Bye

Zaeem Sherazi
Reply By: Gerhard Reply Date: 11/13/2003 7:17:39 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)

Regards



Gerhard Wentink
Reply By: morpheus Reply Date: 11/13/2003 3:03:13 PM
<%

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




Go to topic 6453

Return to index page 1006
Return to index page 1005
Return to index page 1004
Return to index page 1003
Return to index page 1002
Return to index page 1001
Return to index page 1000
Return to index page 999
Return to index page 998
Return to index page 997