虛拟主機(jī)域名注冊-常見(jiàn)問(w≤πèn)題企業(yè)郵局問(wèn)題 → 郵局問(wèn)題


如(rú)何用(yòng)asp的(de)jmail'σ₹•發郵件(jiàn)?
作(zuò)者:

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),隻在收郵件(jiàn) ₽和(hé)加密郵件(jiàn)等我們不(bù)常用(yòng)到(dà≠≈o)的(de)方面進行(xíng)了(le)限制(z×αhì)。

免費(fèi)版下(xià)載 | V4中文(wén)手冊下(xià)載(PDF) | Smtpmail對(duì)象中文(wén)參考下(xià¶₽≥)載(PDF) | 官方網站(zhàn) www.dimac.net
(注意,PDF電(diàn)子(zǐ)文(wén)檔,★≤÷使用(yòng)Adobe Acrobat Reader閱讀(dú)。λ↓∏)

以下(xià)是(shì)在asp程序中調用(yòng)‍≠↔ jmail組件(jiàn)在線發送郵件(jiàn)的(de)例子(z♠'♠λǐ):

<meta http-equiv="Content-Type" cont•©§≈ent="text/html; charset=gb2312">

<%if request("action")="send" σ₩then%>
<%

'參數(shù)說(shuō)明(míng)
'Subject : 郵件(jiàn)标題
'MailAddress : 發件(jiàn)服務器(q☆★✔¥ì)的(de)地(dì)址,如(rú)smtp.163.c •≠om
'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, emai✘γ©‍l, sender, content)
Set JMail = Server.CreateOb¶>☆→ject("JMail.Message")
JMail.Charset = "gb2312" ☆↔€®' 郵件(jiàn)字符集,默認為(wèi)"US-ASCII"
JMail.From = strMailUser ' 發送者地(dì)♠"址
JMail.FromName = sender' 發送者φ≤姓名
JMail.Subject =subject
JMail.MailServerUserNam"≈e = strMailUser' 身(shēn)份驗₹★☆證的(de)用(yòng)戶名
JMail.MailServerPassword₽ε$ = strMailPass ' 身(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,strMaδ≥≠✔ilAdress,strSender,strCon≥±π↕tent,strFromer
strSubject = Request("tit•≤∞le")
strContent = "用(yòng)戶Email:" $£& Request("From") & VbCrL<$f & "電(diàn)話(huà):" & Requestδ±✘("Tel") & VbCrLf & ☆>•✔"內(nèi)容:" & vbcrlf & Reque™>λst("content")
strSender = Request("Name")
strEmail = "anybody@163.com" '這(zhè)是(↕₩shì)收信的(de)地(dì)址,可(kě)以改為('↓₽₩wèi)其它的(de)郵箱
strMailAddress = "mail.yourdo‌÷main.com" '我司企業(yè)郵局地(dì)址,請(q™λ♦ǐng)使用(yòng) mail.您的(de)域名
strMailUser = "user@yourdo¥₹&↓main.com" '我司企業(yè)郵局用(yòng)戶名
strMailPass = "mailpassword"  ≥δ'郵局用(yòng)戶密碼

Call SendAction (strSubjec↑≤t,strEmail,strSender,str£ ♣£Content)

%>

<script language="‍☆δjavascript">
alert('恭喜您,發送成功!');
history.back();
</script>


<%else%>
<style type="text/css"&₩•gt;
<!--body { margin-to§←p: 0px;margin-bottom: 0px;}td {
font-size: 12px;
text-decoration: none;}--></style☆Ω★>
<table width="500" border="0"₹₹∞σ align="center" cellpadding="1" cellsp≤∑acing="1" bgcolor="#666666">
<tr><td height="4® γ0" bgcolor="#E3E3E3"><div al≠σign="center">發郵件(jiàn)給我們</d"♠iv></td></trφ♦>
<tr><td background="images/✘&§&formmail_r2_c1.gif"&g✘λt;<table width="100%"©γ← height="296" border="0" al"→φ ign="center" cellpadding="1" cells₹©®pacing="1">
<form name="form" method="pos¶£♥t" action="?action=send">
<tr bgcolor="#FFFFFF">
<td width="110" align="center"δ€₩><div align="lef≤Ωt">郵件(jiàn)主題(title)*</€↓div></td>
<td width="288"><inp±™ ut name="title" type="t®€≤ext" id="title" size="22">
姓名(name)
<input name="name" type="teλγ±xt" id="name" size="8"&g→"<t;
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td align="center"><div Ω¶®δalign="left">你(nǐ)的(de)郵箱(§φmailaddress)*</div></td&gεδt;
<td><input name="from" ± type="text" id="from" sizeαγ®="22">
電(diàn)話(huà)(tel)
<input name="tel" type="text" id$±="tel" size="15"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="213" align="center"↓​•><div align="left">∞¥內(nèi)容(content):*<br&g& ÷πt;
</div></td>
<td><textarea name="conten<‌★t" cols="50" rows="15"></textareaγ©"♥></td>
</tr>
<tr bgcolor="#FFFFFF">
<td> </td>
<td> <input type="submit" "​≠$name="Submit" value="提交"></td></ ₹π®tr></form></table><♦≥φ/td>
</tr></table>
<%end if%>

詳情請(qǐng)下(xià)載演示文(wén≥↔≤©)檔:
http://www.myhostadmin.≤←net/formjmail.rar



來(lái)源:
閱讀(dú):46104
日(rì)期:2005-09-26

【 雙擊滾屏 】 【 推薦朋(péng)友(yǒu) 】 【 收藏 】 【 打印 】 【 關閉 】 【 字♦★♦體(tǐ):大(dà) 小(xiǎo) 】 
上(shàng)一(yī)篇:遇到(dào)“服務器(qì)內(nèi)部錯(cuò)誤”/http5♣÷§α00怎麽辦?
下(xià)一(yī)篇:如(rú)何連接mysql數(shù)據庫?
  >> 相(xiàng)關文(wén)章(zhān¶×≤g)