Amazon.com: PC Books || Educational Software || Magazines
Amazon: Books-CA || Software-CA || Books-UK || Software-UK

HTML | Javascript | ASP | PHP | VBScript | SQL | Hardware | PC FAQ| WinXP|

Learn to Build, Upgrade, or Repair your Computer Ebook + PC Safety 101 kwwebservice.com Reasonably priced web development & hosting
ASP Basics
Introduction
Variables & Arrays
Sub & Functions
If Statements
Case Statements
Loop Statements
Date Objects
Form Processing
Text File Objects
Database Access
Adding Record
Updating Record
Deleting Record
Virtual Includes
Cookies
Server Variables
Creating Login Page
E-mail
ASP Books @
CA Amazon
UK Amazon
US Amazon

  :: Home
PC Topics
  :: Build A PC
  :: Windows XP
  :: PC Help
Tutorials
  :: HTML
  :: JavaScript
  :: ASP
  :: PHP
  :: VBScript
  :: SQL
Miscellaneous
  :: Code/Scripts
  :: Forum
  :: Links
  :: Contact us
  :: Tell A Friend
  :: In Somali
  ::
Web Articles
  Top Web Hosting
Reviews
  Processing
Online Card Payment Guide
  Domain name
registration & buying guide
  Getting
a website online guide
  Search Engine
submission & optimization tips
Netfirms Web Hosting
Free trial
Quality business correspondence.
Yahoo! Search Marketing

Create email page with aspemail

Code to send an E-mail utilizing html form ASPEmail component.
<%
mailHost = "mail.yourHost.com" 'Chang this line to yours
dim SendButton, contact, subject, email,message, blankField, strError, strSuccess
email=Request.Form("email")
subject=Request.Form("subject")
message=Request.Form("message")
contact=Request.Form("contact")
if subject="" then
    blankField="Provide subject line <br>"
end if
if contact="" then
    blankField=blankField&"Provide your name <br>"
end if
if email="" then
    blankField=blankField&"Provide email to reply to <br>"
end if
if message="" then
    blankField=blankField&"Blank body text!! <br>"
end if
SendButton=Request.Form("Send")="Send"
 If SendButton Then
if blankField <> "" then
    Response.Write("<font color='red'>" &blankField &" Click the back button to re-try.</font>")
 else
    Set Mail = Server.CreateObject("Persits.MailSender")
    Mail.Host = mailHost
    Mail.From = email
    Mail.FromName = contact
    Mail.AddAddress "yourEmail@yourHost.com" 'Change this line to yours
    Mail.Subject = subject
    Mail.Body =message
    strError= ""
    strSuccess = False
    On Error Resume Next
    Mail.Send
    If Err <> 0 Then
        strError = Err.Description
    else
        strSuccess = True
    end if
    end if
    end if
%>
<HTML>
<HEAD><title>Send Email</title></Head>
<BODY >
<table>
<tr>
<td align="center">
    <% If strError <> "" Then %>
    <h3>Error occurred: <% = strError %></h3>
    <% End If %>
    <%
    If strSuccess =True Then
        Response.Write("<font color='red'> Thank you for contacting us. Your e-mail has been sent.</font><br>")
    end if
    %>
    <% if NOT SendButton then %>
    <form name="sendMailForm” action="<%=Request.ServerVariables("URL")%>" method="post">
    <table border="0" cellpadding="10" cellspacing="1" bgcolor="#999999">
<tr><td>
<b>Name:</b><br />
<input type="text" name="contact" size="20" /><br />
<b>Subject:</b><br />
<input type="text" name="subject" size="20" /><br />
<b>E-mail address:</b><br />
<input type="text" name="email" size="20"><br />
<b>Your message: </b><br />
<textarea name="message" cols="56" rows="15"/></textarea><br><br />
<input type="submit" name="Send" value="Send">
</td></tr></table>
</form>
<% end if %>
</td>
</tr>
</table>
</BODY>
Create login Page Home
Bluehost.com Web Hosting $6.95
PC System Tools
SpyCleaner
Registry Mechanic
4Diskclean Pro
Health PC Club
TweakNow
Registry Washer
SpyAnyWhere
System Lifeguard
...More/Details

PC Articles
  Computer Safety
prevent viruses & Spyware