简体   繁体   English

Windows 2008 Server如何获取ASPEmail发送到自己的域

[英]windows 2008 server how to get ASPEmail to send to own domain

I have a friend who runs his website on a windows 2008 server. 我有一个朋友在Windows 2008服务器上运行他的网站。 I have set up an asp classic form to email page on his website (hisdomain.com) which takes the input from a contact form and sends it out by email. 我已经在他的网站(hisdomain.com)上建立了一个ASP经典表单到电子邮件页面,该表单从联系人表单中获取输入并通过电子邮件发送出去。

The problem is that it only works if the email is being sent to a different domain (something@anotherdomain.com). 问题在于,只有在将电子邮件发送到其他域(something@anotherdomain.com)时,它才有效。 If the email is being sent to the same domain (anything@hisdomain.com) it never arrives. 如果电子邮件被发送到相同的域(anything@hisdomain.com),它将永远不会到达。

Mailer.AddAddress "someone@anotherdomain.com"

Works. 作品。

Mailer.AddAddress "someone@hisdomain.com"

Does not work. 不起作用。

I have hunted this site and Google for a resolution but cannot find one. 我已经在这个网站和Google上寻找了解决方案,但找不到。

Does anyone know how to fix this issue? 有人知道如何解决此问题吗?

Many thanks 非常感谢

Tog Porter 托格·波特

Update: It turns out he uses Gmail business to control his domain emails and there was a filter in there that bounced the messages because the sender was the same as the recipient. 更新:事实证明,他使用Gmail业务来控制自己的域电子邮件,并且其中有一个过滤器可以退回邮件,因为发件人与收件人相同。

Bypassing the Gmail spam filter has fixed the problem. 绕过Gmail垃圾邮件过滤器已解决了该问题。

Use this code and replace your smtp server information 使用此代码并替换您的smtp服务器信息

 <% Set myMail=CreateObject("CDO.Message") myMail.BodyPart.Charset = "UTF-8" myMail.Subject= Your Message Subject myMail.From= "anotheremail@anotherdomain.com" myMail.To=Receiver Email Address myMail.CreateMHTMLBody "Test Email Subject" myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")= SMTP_SERVER myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport")=25 myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername")=SMTP_Email_Username myMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword")=Smtp_Email_Password myMail.Configuration.Fields.Update myMail.Send set myMail=nothing %> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM