使用组件实现邮件发送,但老是提示发送失败,why??
各位大侠,请教一个问题,我现在编写了一个asp程序,想借助新建的邮件系统来发送邮件,用程序来指令接收的邮件地址,但是高度的结果是发送失败,我参考过官网上的:使用组件实现邮件发送 http://www.winwebmail.com/aspsend.html出现的情况依旧,大家有没有碰过类似的问题啊,如何解决的呢?我用jmail发也不行
代码我贴出来了,其实有行:mailsend.CreateNew sender, "abc" 我不知道是代表什么意思,如下:
<%@LANGUAGE = VBSCRIPT%>
<html>
<body>
<%
if IsEmpty(Application("em_MaxMPOP3")) and IsEmpty(Application("em_MaxSigns")) then
dim mam
set mam = server.createobject("easymail.AdminManager")
tmp_num = 0
do while tmp_num < 30
mam.LoadExt
if mam.IsLoadOK = true then
Exit Do
end if
mam.Sleep 500
tmp_num = tmp_num + 1
loop
if mam.IsLoadOK = true then
Application("em_MaxMPOP3") = mam.MaxMPOP3
Application("em_MaxSigns") = mam.MaxSigns
Application("em_SystemAdmin") = LCase(mam.SystemAdmin)
Application("em_EnableBBS") = mam.EnableBBS
Application("em_Enable_SignHold") = mam.Enable_SignHold
Application("em_Enable_FreeSign") = mam.Enable_FreeSign
Application("em_Enable_SignWithDomainUser") = mam.Enable_SignWithDomainUser
Application("em_Enable_SignNumberLimit") = mam.Enable_SignNumberLimit
Application("em_SignNumberLimitDays") = mam.SignNumberLimitDays
Application("em_Enable_ShareFolder") = mam.Enable_ShareFolder
Application("em_Enable_SignEnglishName") = mam.Enable_SignEnglishName
Application("em_LogPageKSize") = mam.LogPageKSize
Application("em_TestAccounts") = LCase(mam.TestAccounts)
Application("em_SignMode") = mam.SignMode
Application("em_SignWaitDays") = mam.SignWaitDays
Application("em_am_Name") = mam.am_Name
Application("em_am_Accounts") = LCase(mam.am_Accounts)
Application("em_AccountsAdmin") = LCase(mam.AccountsAdmin)
Application("em_EnableEntAddress") = mam.Enable_Show_EntAddress
Application("em_EnableTrap") = mam.EnableTrap
if mam.EnableTrap = true then
Application("em_TrapMail") = mam.TrapMail
end if
end if
set mam = nothing
end if
%>
<%
Dim mailsend
Dim sender
' 发送帐号是 admin
sender = "abc@mail.chinaabc.cn"
' 创建MailSend对象
Set mailsend = Server.CreateObject("easymail.MailSend")
mailsend.CreateNew sender, "abc"
' 发信人名称
mailsend.MailName = "系统管理员"
' 收件人邮件地址
mailsend.EM_To = "liqian158@163.com"
mailsend.EM_Subject = "邮件主题"
mailsend.EM_Text = "邮件正文内容!"
if mailsend.Send() = false then
Response.Write "邮件发送失败!"
else
Response.Write "邮件发送成功!"
end if
Set mailsend = Nothing
%>
</body>
</html> 你有帐号是abc@mail.chinaabc.cn的嘛 官方的例子直接就可以发送了。。
页:
[1]