快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

用EASYMAILOBJECT组件处理EXCHANGE邮件源代码(5)

在ASP中用EasyMailObject组件处理Exchange邮件源代码---发送邮件(p_sendmail.asp)

<%@ Language=VBScript %>
<%

if session("straccount")="" or session("strpassword")="" then
Response.End
end if
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<STYLE>
<!--
A{text-decoration:none}
-->
</STYLE>
<BODY>
<% Set SMTP = CreateObject("EasyMail.SMTP.5")
SMTP.LicenseKey = "awa/S19I500R1AX30C0R3100"
SMTP.MailServer = "192.9.200.89"
SMTP.Subject = Request.Form("subject")
SMTP.BodyText = Request.Form("bodytext")
SMTP.From = Request.Form("from")
SMTP.FromAddr = Request.Form("fromaddr")
SMTP.AddRecipient Request.Form("from"), Request.Form("receive1") , 1

\\\'添加附件
if Request.Form("att")="" then
Response.Write ""
else
x = SMTP.AddAttachment(Request.Form("att"), 0)
If Not x = 0 Then
Response.Write "插入附件错误: " + cstr(x) + "请与治理员联系。"
End If
end if
x = SMTP.Send

If x = 0 Then
\\\' Response.Write ("<P align=center><br><br>")
\\\' Response.Write ("<font size=")
Response.Write "<p align=\\\'center\\\'><br><br><b><font face=\\\'宋体\\\' size=\\\'5\\\' color=\\\'#00FFFF\\\'><span style=\\\'background-color: #000080\\\'>邮件已成功发出!</font></span></b>"
\\\' session("sended")="Y"
Else
if x=7 or x=5 then
Response.Write "<br><br><p align=\\\'center\\\'><b><font face=\\\'宋体\\\' size=\\\'5\\\' color=\\\'#00FFFF\\\'><span style=\\\'background-color: #000080\\\'>发邮件发生错误(" + cstr(x)+ ").发件人地址错误</span></font></b>"%>
<br><br><input type="button" onclick="history.go(-1)" value="返回">
<%Response.End
else
Response.Write "<br><br><p align=\\\'center\\\'><b><font face=\\\'宋体\\\' size=\\\'5\\\' color=\\\'#00FFFF\\\'><span style=\\\'background-color: #000080\\\'>发邮件发生错误: " + cstr(x)+ "</span></font></b>"%>
<br><br><input type="button" onclick="history.go(-1)" value="返回" id=button1 name=button1>
<%Response.End
end if
End If


Set SMTP = Nothing

%>

<P align="center"> <a href="javascript:window.close();">
<font face="宋体" size="5"><b><span style="background-color: #FFFF00">返回</span></b></font></a></P>

</BODY>
</HTML>
返回类别: 教程
上一教程: REQUEST与REQUEST.FORM的速度测试
下一教程: ASP进阶教程Ⅰ:循序渐进学留言薄

您可以阅读与"用EASYMAILOBJECT组件处理EXCHANGE邮件源代码(5)"相关的教程:
· 用EASYMAILOBJECT组件处理EXCHANGE邮件源代码(3)
· 用EASYMAILOBJECT组件处理EXCHANGE邮件源代码(6)
· 在ASP中用EASYMAILOBJECT组件处理EXCHANGE邮件源代码-读取邮件主题和大小
· 用EASYMAILOBJECT组件处理EXCHANGE邮件源代码(2)
· 用EASYMAILOBJECT组件处理EXCHANGE邮件源代码(1)
    微笑服务 优质保证 索取样品