Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll

my Blog
[prev. Lesson]  Flash Detection w/BrowserHawk
     [next Lesson]  ServerObject: Mailing Form w/ASPMail

ASPMail™ by Server Objects

www.serverobjects.com is a great place to get a variety of components. Here we will give you a simple script utilizing genusa mail that e-mails me each time you run the page.

http://www.learnasp.com/learn/test/serverobjectsmail.asp
is the page you can test this at.

   filename=/learn/test/serverobjectsmail.asp

<Test Script Below>


<html><head>
<title>serverobjectsmail.asp</title>
</head><body bgcolor="#FFFFFF">
<%
' ASPMail(tm) from www.serverobjects.com
' is not part of ASP per se, 
' but a third party utility from serverobjects.com
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = "localhost"
Mailer.qmessage=true
Mailer.FromName = "Some Student"
Mailer.FromAddress = "somestudent@activeserverpages.com"
Mailer.AddRecipient "Charles Carroll","selfdestruct@learnasp.com"
Mailer.AddBCC "Sally Jones","selfdestruct@learnasp.com"
Mailer.Subject = "ASPMail Tutorial"

Mailer.BodyText = "Hi. Just trying the mail example" & vbCrLf 
Mailer.BodyText = "Line 2"
Mailer.BodyText = "Line 3"  
If Mailer.SendMail then
    Msg = "mail sent sucessfully!"
Else
    Msg = "mail <b>not</b> sent sucessfully"
    msg = msg & "<br>" & mailer.response
End If
response.write Msg

set mailer=nothing
%>
</body></html>

There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too. a $5 tip buys him lunch at McDonalds, a $20 tip buys his kid Hitoshi a new computer game, a $39 tip buys his daughter Michiko a few nice outfits. See our donor list.