Jan
31
2006
How to use it
Posted by admin under
Generic sendmail
This is the generic function header:
Function SendEmail( sEmailServer, sFromEmail, sToEmail, sSubject, sText )
It can be called like this:
sErrMsg = SendEmail( "smtp.theserver.com",
"webmaster@aspcode.net",
"John@doe.com",
"Important message",
"This is an important message bla bla" )
OK, how does it work?
1. You select the Email-component you have installed at your webserver on the Use it! page and press the Get Code button.
2. You take that code generated to you and copies it into a file you call IncGenMail.asp.
3. You include that file from the ASP page you want to send email from.
<!--#include file="incgenmail.asp"-->
4. You call the function as described above and more exact below.
Parameters
sEmailServer
The name of the email server you are supposed to use. Ask your webhost if you are not sure.
sFromEmail
The email address that should be the sender
sToEmail
Email address to the person you are sending it to
sSubject
Mail header
sText
The text. You can of course build it up to use multiple lines like this:
sText = "Hello" & vbCrLf
sText = sText & "Long time no seeing"