W3 Jmail 使用范例

发表于:2007-06-30来源:作者:点击数: 标签:
html head titleConfirmation /title body % Set JMail = Server.CreateObject(JMail.SMTPMail) 憭 This is my local SMTP server JMail.ServerAddress = mail.yourdomain.com:25 憭 This is me.... JMail.Sender = myemail@mydomain .net JMail.Subject = He
<html>
<head>
<title>Confirmation </title>
<body>
<%

Set JMail = Server.CreateObject("JMail.SMTPMail")

憭 This is my local SMTP server
JMail.ServerAddress = "mail.yourdomain.com:25"

憭 This is me....
JMail.Sender = "myemail@mydomain.net"
JMail.Subject = "Here you go..."

憭 Get the recipients mailbox from a form (note the lack of a equal sign).
JMail.AddRecipient "mum@any.com"
JMail.AddRecipient "dad@some.com"

憭 The body property is both read and write.
憭 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!"
憭 which in many cases is easier to use.
JMail.Body = "Here you go. Your request has been approved" &_
"and the program is attached to this message"


憭 1 - highest priority (Urgent)
憭 3 - normal
憭 5 - lowest

JMail.Priority = 1

JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")

憭 Must make sure that IUSR_???? has aclearcase/" target="_blank" >ccess to the following files.
JMail.AppendBodyFromFile "e:\mail\standard_footer.txt"
JMail.AddAttachment "e:\products\MyProduct.exe"

憭 Send it...
JMail.Execute

%>
<center>

An e-mail has been sent to your mailbox (<%=request.form("email")%>).

</center>
</body>
</html>

原文转自:http://www.ltesting.net