Jmail is a fast and free Email program that can be used to send email from any webpage(ASP). In order to use it you must make sure your server supports ASP and has Jmail installed.
Here is just an example of a simple HTML page that we are going to use to send an email.
=========================================================
Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form name="form" method="post" action="sendmail.asp">
<p>Your Name:
<input name="your_name" type="text" id="your_name">
</p>
<p>Your EMail Address:
<input name="your_email" type="text" id="your_email">
</p>
<p>Recipients Email Address:
<input name="email_to" type="text" id="email_to">
</p>
<p>Subject:
<input name="subject" type="text" id="subject">
</p>
<p>Message:
<textarea name="message" id="message"></textarea>
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>
On the next page we will make sendmail.asp to recieve the form and use Jmail code to send the email.
On this page we are going to create an ASP file called sendmail.asp that will deal with sending the email. Below is the sample code! Code that isn't used is commented out by the ' (apostrophe) symbol.
Code:
<%
Set JMail = Server.CreateObject("JMail.SMTPMail")
' This is your local SMTP server
JMail.ServerAddress = "mail.yourdomain.com"
' This is your email and subject line
JMail.Sender = Request.Form("your_email")
JMail.Subject = Request.Form("subject")
' Get the recipients mailbox from the form
' Note the lack of the equal sign
JMail.AddRecipient Request.Form("email_to")
' If you want to append text to the body you can
' use JMail.Body = JMail.Body & "Hello world!"
' or you can use JMail.AppendText "Hello World!"
JMail.Body = Request.Form("message")
' 1 - highest priority (Urgent)
' 3 - normal
' 5 - lowest
JMail.Priority = 3
'This code can be used to send an attachment!
'JMail.AddAttachment "e:\products\MyProduct.exe"
JMail.Execute
%>
And thats it!