强制cfmail标记从特定服务器IP地址发送 [英] Force cfmail tag to send from a specfic server IP address

查看:284
本文介绍了强制cfmail标记从特定服务器IP地址发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的服务器设置:


  • Web服务器:ColdFusion 10 u10 64位,Windows Server 2008 R2,私人IP地址。

  • 邮件服务器:是不同的Windows 2008 R2服务器。

这个问题很简单,我有两个网站(这只是理论;例如使用私有IP)。

Keeping it simple for this question, I have two web sites (this is just theory; using private IPs in example).


  • 网站1:10.10 .10.1

  • 网站2:10.10.10.2

我使用cfmail标记,但是当我查看发送的电子邮件的邮件头和邮件服务器上的SMTP日志时,它表示邮件是从站点2(10.10.10.2)发送的。

I'm sending mail using the cfmail tag from Site 1 (10.10.10.1), but when I look at the mail headers of the sent emails and the SMTP log on the mail server, it says that the mail was sent from Site 2 (10.10.10.2).

我对这个问题进行了一些google搜索,并提出了此错误报告
该错误似乎没有被修复。但是,我想知道是否有任何解决方法。我希望从网站1发送的邮件在电子邮件标头中具有该网站的IP地址。

I did some google searches regarding this issue and came up with this bugbase report. The bug doesn't appear to have been fixed. However, I was wondering if there were any work-arounds. I want the mail that is sent from "Site 1" to have that sites IP address in the email header.

推荐答案

尝试指定类似于以下的邮件服务器?

Have you tried specifing the mailserver similar to the below?

 <cfmail 
to="<<<email>>>"
from="<<<fromEmail>>>"
subject="Some Subject"
type="html"
server="server to send from (ip)" 
port="port for mail server">
        body=" <<<content here>>>"

默认情况下Coldfusion会使用电子邮件服务器在管理控制台中配置。通过在cfmail标记中定义邮件服务器,这应该被覆盖。

By default Coldfusion will use the email server configured in the admin console. By defining mail servers in the cfmail tag this should be overwritten.

这篇关于强制cfmail标记从特定服务器IP地址发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆