
Learn how to send mail using the power of ASP.ASP gives you the power to send mail using the "CDONTS" mail object.This script will send an email from a user to whichever email addressyou choose. NOTE: if you are using Windows XP/IIS.NET, please see ourtutorial regarding CDOSYS. We will ask for three things on the form tokeep it simple: their name, their e-mail address, and their comments.This script will either process the email or show the form, dependingon whether the "submit" button was pressed:
<%If request("submit") <> "" THENSet objEMail = Server.CreateObject("CDONTS.NewMail")objEMail.To = "your@emailaddress.com"objEMail.From = Request("from")objEMail.Subject = Request("subject")objEMail.Body = Request("message") objEMail.Send()Set objEMail = NothingResponse.Write("Message Sent")Else%><form method="post" action="test.asp">From Email: <INPUT type=text name="from"><br />Subject: <INPUT type=text name="subject"><br />Message: <TEXTAREA name="message" rows=10 cols=40></TEXTAREA><br /><INPUT type="submit" value="Send" name="submit"></form><% End If%> |
Not too hard eh?
Related Articles
- PHP Mail Form Tutorial
This script is widely used by many sites on the net. PHP provides an easy way to send mail via the function mail().
- E-mail form using HTML and PHP
Sometimes its a nice touch to include an e-mail feedback form on your contact page or elsewhere on your web site. Lets create an e-mail form using html and a simple php script to send it along.
- How to make a simple form mailer with PHP
As you may be well aware, displaying your e-mail address on your website can lead to e-mail harvesters picking up your address and adding it to hundreds or even thousands of lists used by spammers...
- Simple Contact Form
Learn how to write a clean and easy contact form for your site.
- What is Web Mail?
E-mail is something we all get and soon we will not be able to exist without it. In the time we live in today it is becoming more and more important to have a place to be reached on the Internet. At one time, being able to check your E-mail through a client, like Outlook Express, was enough...
- The Importance of Having a Feedback Form in Your E-commerce Website
Internet marketing is a different ball game altogether when compared to traditional marketing. A brick and mortar store employs salespersons to guide and advise its customers. No such equivalent of a salesperson exists for an online store. This could be one of the reasons why people shy away from on...
- PHP Contact Form
First, lets create the html section. I made a simple form, but it gets the job done. You can customize it if you want, but remember to use the same form variables.
- Form Email
Learn to send mail with the php mail(); function.
- The Top 15 Essential Ingredients Of Every WINDOWS HOSTING Plan (Package)
First things First. Why would you like to have Windows Based Hosting when there are Linux packages for cheaper rates ? The answer is - it depends on what application you are looking to use for your hosting. Consider the tools and scripting languages you plan to use - if you use PHP, Perl or MySQL, L...
- Form Validation using PHP
Today Ill take it up a level and re-write that script using the if, else conditional and empty() function to include form validation.
Need Website Designing, Development, Redesigning, Maintenance and SEO services or help growing your company's web presence?
Request a free Quote Now.