主题:  帮忙看看源代码,错在哪里?(关于自动寄信)

浮尘

职务:普通成员
等级:3
金币:7.0
发贴:1258
#12003/6/6 15:57:15
我在学习ASP,照相关资料写了一个关于自动寄信的页子,运行时未出现报错,可是在信箱中就是收不到东西,请大家帮忙看看错误在哪里?
<% @LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>


自动寄信服务




<%
Dim ToWho,ToMail,FromWho,FromMail,Subject,Content
    ToWho=Request("ToWho")
    ToMail=Request("ToMail")
    FromWho=Request("FromWho")
    FromMail=Request("FromMail")
    Subject=Request("Subject")
    Content=Request("Content")
    
    Dim objMail
    Set objMail=Server.CreateObject("CDONTS.NewMail")
    objMail.To=ToMail
    objMail.From=FromMail
    objMail.Subject=Subject
    objMail.Body=Content
    
    objMail.BodyFormat=0
    objMail.MailFormat=0
    
    objMail.Send
    Response.Write "您的邮件已经寄出去了。<<< 单击这里返回 >>>"
    Set objMail=Nothing
%>



浮尘

职务:普通成员
等级:3
金币:7.0
发贴:1258
#22003/6/6 16:58:57
我设置了SMTP 虚拟服务器,不知是否和在局域网中有关系?



{ 在指尖上绽放的花朵 }

职务:普通成员
等级:5
金币:14.0
发贴:3209
#32003/6/6 23:19:02
发出邮件的前提是你的active server连上internet
Assuming that you have a DNS server to resolve the MX and A records, the SMTP server will deliver the mail. If you don't have a local DNS server, don't fear--you can route the messages to a remote SMTP server that's configured to send messages to the Internet. This is often the case in most organizations where you have to use a corporate mail server for all outbound email.



浮尘

职务:普通成员
等级:3
金币:7.0
发贴:1258
#42003/6/6 23:42:56
谢谢行者,但能说的更明白一点么,我 E 文不太好。不过,我回到家里后,用同样的代码,发送邮件成功了,说明代码没有问题,有问题的是局域网,不知道在局域网中该如何解决这个问题?