imail和Mdaemon设计Webmail-发送邮件调用文件

王朝厨房·作者佚名  2007-01-05
窄屏简体版  字體: |||超大  

<%@ 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>

<p align="center">正在发送..........</p>

<% Set SMTP = CreateObject("EasyMail.SMTP.5")

SMTP.LicenseKey = "awa/S19I500R1AX30C0R3100"

SMTP.MailServer = session("strserver")

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><b><font face='宋体' size='5' color='#00FFFF'><span style='background-color: #000080'>邮件已成功发出!</font></span></b>"

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>

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航