搜索文章:

首页  |  Java技术  |  Asp.net  |  Asp编程  |  VC/C++  |  Delphi  |  VB编程
上一篇:W3 Jmail 参考说明 >>

W3 Jmail 使用范例

<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 access 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>

()

相关文章:
© 2006   www.java-asp.net