•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 373,099 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,885 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 602 | Replies: 2
![]() |
•
•
Join Date: Sep 2007
Posts: 15
Reputation:
Rep Power: 1
Solved Threads: 0
hi ,
I hav developed a contact us form for a site in asp...
but when i press submit button its not sending mail......
iam using windows server with XP OS................
I hav pasted the code below.......Plz go thru it ......n try it so that it is workin........
if not plz provide me a workin model ..................
Plz.....help me out...........
regards,
cutebab
I hav developed a contact us form for a site in asp...
but when i press submit button its not sending mail......
iam using windows server with XP OS................
I hav pasted the code below.......Plz go thru it ......n try it so that it is workin........
if not plz provide me a workin model ..................
Plz.....help me out...........
regards,
cutebab
html Syntax (Toggle Plain Text)
<html> <head> <title>Feedback Form</title> </head> <body bgcolor="#FFFFFF"> <% If Request.Form="" Then %> <form method="post" action="file:///C|/DOCUME%7E1/MRC%7E1.SAD/LOCALS%7E1/Temp/Temporary%20Directory%202%20for%20feedback.zip/feedback.asp" name="form1"> <div align="center">Send us your Feedback.<br> <br> </div> <div align="center"> <table width="75%" border="0"> <tr> <td>Name</td> <td> <input type="text" name="txtName"> </td> </tr> <tr> <td>Email</td> <td> <input type="text" name="txtEmail"> </td> </tr> <tr> <td>Comments</td> <td> <textarea name="txtFeedback" cols="40" rows="7"></textarea> </td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> <input type="submit" name="Submit" value="Submit"> <input type="reset" name="Reset" value="Reset"> </td> </tr> </table> </div> </form> <br> <% Else 'receive the form values Dim sName, sEmail, sFeedback sName=Request.Form("txtName") sEmail=Request.Form("txtEmail") sFeedback=Request.Form("txtFeedback") ' create the HTML formatted email text Dim sEmailText sEmailText = sEmailText & "<html> " sEmailText = sEmailText & "<head>" sEmailText = sEmailText & "<title>HTML Email</title>" sEmailText = sEmailText & "</head>" sEmailText = sEmailText & "<body>" sEmailText = sEmailText & "<font color='#00000' size='2' face='Verdana'>" sEmailText = sEmailText & "Feedback message from: " & sName & "<br>" sEmailText = sEmailText & "Message:" & sFeedback & "<br>" sEmailText = sEmailText & "Date & Time:" & Now() & "<br>" sEmailText = sEmailText & "IP :" & Request.ServerVariables("REMOTE_ADDR") sEmailText = sEmailText & "</font>" sEmailText = sEmailText & "</body>" sEmailText = sEmailText & "</html>" 'create the mail object Set NewMailObj=Server.CreateObject("CDONTS.NewMail") NewMailObj.From=sEmail 'This is the email of the feedback sender NewMailObj.To = "cjk@yahoo.com" 'change to your address NewMailObj.Subject = "Feedback" NewMailObj.Body = sEmailText 'you need to add these 2 lines for the mail to be sent in HTML format 'remove them and the email will be sent in Text format NewMailObj.BodyFormat = 0 NewMailObj.MailFormat = 0 NewMailObj.Send Set NewMailObj=Nothing Response.write "<div align='center'>Thank you for sending your feedback.<br>" Response.write "We will get back to you if necessary.</div>" End If %> </body> </html>
Last edited by peter_budo : Apr 1st, 2008 at 7:26 am. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
advertisment advice browser cell chain mail daniweb email email misuse encryption eu eudora expose firefox gmail google imap india microsoft mobile mozilla news onecare open source opinion outlook penelope phishing phones professional research scam security spam spammers spamming stocks technology thunderbird uk.government virus visa web webmail
- Importing data from .csv then putting this on body of email (ASP)
- need help with dynamic form in asp (ASP)
- Newbie Needs Form Help (PHP)
- Closing the main form (app). (Pascal and Delphi)
- Need help sending email (ASP.NET)
- PHP Contact Form Help (PHP)
- Using CSS in email? Or alternative? (HTML and CSS)
- Email Sending Problem in ASP.NET (ASP.NET)
- Sending form email (PHP)
Other Threads in the ASP Forum
- Previous Thread: Problem in setting text extracted from database in Textarea in ASP
- Next Thread: Quick question: Cookie key value.


Linear Mode