JMail 組件(jiàn)
Dimac 公司的(de)郵件(jiàn) ☆收發組件(jiàn),這(zhè)是(shì)一(yī)個(gè♠☆)非常成熟和(hé)強大(dà)的(de)郵件(jiàn)組件(jiàn)。它不(b∑®σù)但(dàn)可(kě)以完成發郵件(jiàn)的("©de)工(gōng)作(zuò),還(hái)可(kě)以POP收信,并支持收發郵件(jiàn)時♥™↔(shí)的(de)PGP加密,內(nèi)置一(yī)個(gè)群發郵件(jià×'n)的(de)對(duì)象,可(kě)以使群發編程更簡單。
即使是(shì)很(hěn)多(duō)其他(tā)組件(jiàn)也(yě)都≤∏₹(dōu)能(néng)完成的(de)發郵件(jiàn)功能₹×≈↓(néng),JMail 的(de)完成也(yě)可(kě)以稱得(de)上(shàng)★£₽最出色的(de),除了(le)常見(jiàn)的(de)抄送暗(àn)送等多(≥≥↑✔duō)收件(jiàn)人(rén)功能(néng)外(§£wài),它還(hái)支持添加嵌入式圖片附件(jiàn),并且可(kě)₹σ≠以從(cóng)URL讀(dú)取文(wén)件(jiàn)♣ 作(zuò)為(wèi)附件(jiàn)。
JMail 的(de)免費(fèi)版本擁有(β≠£αyǒu)全部完成的(de)發郵件(jiàn)功能(néng),隻在收郵件(j$≥→iàn)和(hé)加密郵件(jiàn)等我們不(bù$γ)常用(yòng)到(dào)的(de)方面進行(xíng)了(le)限制(β¥πzhì)。
免費(fèi)版下(xià)載 | V4中文(wén)手冊下(xià)載(P≠♦↑<DF) | Smtpmail對(duì)象中文(wén)參考下(xià)載( ↔PDF) | 官方網站(zhàn) www.dimac.netα✔←
(注意,PDF電(diàn)子(zǐ)文(wén)檔,使用(yòng)Adobe A'''crobat Reader閱讀(dú)。)
以下(xià)是(shì)在asp程序中調用(yòng)jmail組件(jiàn)在線←×發送郵件(jiàn)的(de)例子(zǐ):
<meta http-equiv="Content-Type" content=αγ✘"text/html; charset=gb2312">
<%if request("action")="send" then%>
<%
'參數(shù)說(shuō)明(mín ∞"<g)
'Subject : 郵件(jiàn)标題
'MailAddress : 發件(jiàn)服務器(qì)的(de₽≥↓)地(dì)址,如(rú)smtp.163.com
'Email : 收件(jiàn)人(rén)郵件(jiàn)地(dì)址
'Sender : 發件(jiàn)人(rén)姓名
'Content : 郵件(jiàn)內(nèi)容
'Fromer : 發件(jiàn)人(rén)的(de)郵件(∞¶≤≥jiàn)地(dì)址
Sub SendAction(subject, em≈§₽ail, sender, content)
Set JMail = Server.CreateObj§ect("JMail.Message")
JMail.Charset = "gb2312" ' 郵件(jiàn)字符集,默認為(wèiσ<>)"US-ASCII"
JMail.From = strMailUser ' 發送者β•地(dì)址
JMail.FromName = senderα₽£' 發送者姓名
JMail.Subject =subject
JMail.MailServerUserName = strMa≠•₽ilUser' 身(shēn)份驗證的(de)用(yòng≥☆©)戶名
JMail.MailServerPassword = s ≤trMailPass ' 身(shēn)份驗證的(de)密碼
JMail.Priority = 3
JMail.AddRecipient(email)
JMail.Body = content
JMail.Send(strMailAddress)
End Sub
'調用(yòng)此Sub的(de)例子(zǐ)
Dim strSubject,strEmail,strMailAdress,strSenπ↑der,strContent,strFromer
strSubject = Request("title")
strContent = "用(yòng)戶Em♦♣σail:" & Request("From") &δ£α® VbCrLf & "電(diàn)話(huà):" &am≤®p; Request("Tel") &♦↔∏ VbCrLf & "內(nèi)容:" & vbcrlf &↓π'☆; Request("content")
strSender = Request("Name")
strEmail = "anybody@163.comε<•" '這(zhè)是(shì)收信的(de)地(dì)址,可(© ÷kě)以改為(wèi)其它的(de)郵箱
strMailAddress = "mail.yourdoma ↔'in.com" '我司企業(yè)郵局地(dì)址,請(qǐng)使用(yòng) mail.您₽≥®的(de)域名
strMailUser = "user@yourdomain.com" '我司λ₹↕企業(yè)郵局用(yòng)戶名
strMailPass = "mailpassw≤♣•®ord" '郵局用(yòng)戶密碼
Call SendAction (strSubject,s™↑trEmail,strSender,strCont♥ $φent)
%>
<script language="javascript">
alert('恭喜您,發送成功!');
history.back();
</script>
<%else%>
<style type="text/css">
<!--body { margin-top₩♦λ: 0px;margin-bottom: 0px;}td {
font-size: 12px;
text-decoration: none;}--></style&g₽∏t;
<table width="500" border="0" align="center←↕" cellpadding="1" cellspac€ ₽₽ing="1" bgcolor="#666666">φ•£₽
<tr><td height="40" bgcolor="×™♣£#E3E3E3"><div align✔§="center">發郵件(jiàn)給我們</div></td&π ♦gt;</tr>
<tr><td background→↓™="images/formmail_r2_c1.gif">&ββ★lt;table width="100%" height="296" bo>±¶←rder="0" align="center" cellpad®♣ding="1" cellspacing="1">
<form name="form" met§≤πhod="post" action="?ac✔±¶±tion=send">
<tr bgcolor="#FFFFFF">
<td width="110" align="centerβ•"><div align="left">郵件(jiàn)主₩>ε÷題(title)*</div>♥ ©</td>
<td width="288">&l♠π©t;input name="title" type="text" id↑ ε="title" size="22">
姓名(name)
<input name="name" type="text→β" id="name" size="8">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="center"><div align="left"&g >®δt;你(nǐ)的(de)郵箱(mailaddress)*</div>£®α</td>
<td><input name="frγ≈om" type="text" id="from" size="22">
電(diàn)話(huà)(tel)
<input name="tel" type="text" i↔∞d="tel" size="15"></td&g∑∑£•t;
</tr>
<tr bgcolor="#FFFFFF"&g±λt;
<td height="213" δ•€φalign="center"><di§'v align="left">內(n₹∑èi)容(content):*<br&g↑∑×↕t;
</div></td>
<td><textarea name∞₩≠="content" cols="50" ✘≈£rows="15"></textarea><αλ¶☆/td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td> <input type=≤£♥→"submit" name="Submit" value="提交"></td></tr></f♦©σorm></table></td>
</tr></table>
<%end if%>
詳情請(qǐng)下(xià)載演示文(wén)檔:
http://www.myhostadmin.net/formjmail.rar