Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Coldfusion 使用CFMail发送多封电子邮件时,电子邮件的顺序会发生更改_Coldfusion - Fatal编程技术网

Coldfusion 使用CFMail发送多封电子邮件时,电子邮件的顺序会发生更改

Coldfusion 使用CFMail发送多封电子邮件时,电子邮件的顺序会发生更改,coldfusion,Coldfusion,我在通过CF 2016发送以下两封电子邮件时遇到问题。当我运行代码时,我首先收到“密码”邮件,然后是“用户名”邮件。发送的顺序正在更改。我需要先收到“用户名”邮件,然后再收到“密码”邮件。我如何解决这个问题 <cfmail to="#toEmail#" from="#fromEmail#" subject="Username" type="html"> Your username is #username# </cfmail> <cfmail to=

我在通过CF 2016发送以下两封电子邮件时遇到问题。当我运行代码时,我首先收到“密码”邮件,然后是“用户名”邮件。发送的顺序正在更改。我需要先收到“用户名”邮件,然后再收到“密码”邮件。我如何解决这个问题

<cfmail to="#toEmail#" from="#fromEmail#" subject="Username" type="html">
      Your username is #username#
</cfmail>

 <cfmail to="#toEmail#" from="#fromEmail#" subject="Password" type="html">
      Your password is #password#
 </cfmail>

您的用户名是#username#
您的密码是#password#

您可以随时执行以下操作:

<cfmail to="#toEmail#" from="#fromEmail#" subject="Username" type="html">
      Your username is #username#
</cfmail>

<cfthread name="SendPassword" action="run">
<cfscript>
sleep(appropriate number of milliseconds);
</cfscript>
 <cfmail to="#toEmail#" from="#fromEmail#" subject="Password" type="html">
      Your password is #password#
 </cfmail>
</cfthread>

您的用户名是#username#
睡眠(适当的毫秒数);
您的密码是#password#

查看假脱机设置以获得适当的毫秒数。

您始终可以执行以下操作:

<cfmail to="#toEmail#" from="#fromEmail#" subject="Username" type="html">
      Your username is #username#
</cfmail>

<cfthread name="SendPassword" action="run">
<cfscript>
sleep(appropriate number of milliseconds);
</cfscript>
 <cfmail to="#toEmail#" from="#fromEmail#" subject="Password" type="html">
      Your password is #password#
 </cfmail>
</cfthread>

您的用户名是#username#
睡眠(适当的毫秒数);
您的密码是#password#

查看假脱机设置以获得适当的毫秒数。

您可以使用
spooldenable
在每个
cfmail
的基础上禁用邮件假脱机。但它确实会减慢页面速度。只在第一封邮件上试用。这将立即发送第一封电子邮件。然后让第二封邮件被假脱机,以便空闲/稍后发送

<cfmail to="#toEmail#" from="#fromEmail#" subject="Username" type="html" spoolEnable="no">
      Your username is #username#
</cfmail>
<cfmail to="#toEmail#" from="#fromEmail#" subject="Username" type="html">
      Your username is #username#
</cfmail>

您的用户名是#username#
您的用户名是#username#

您可以使用
spooldenable
在每个
cfmail
的基础上禁用邮件假脱机。但它确实会减慢页面速度。只在第一封邮件上试用。这将立即发送第一封电子邮件。然后让第二封邮件被假脱机,以便空闲/稍后发送

<cfmail to="#toEmail#" from="#fromEmail#" subject="Username" type="html" spoolEnable="no">
      Your username is #username#
</cfmail>
<cfmail to="#toEmail#" from="#fromEmail#" subject="Username" type="html">
      Your username is #username#
</cfmail>

您的用户名是#username#
您的用户名是#username#

如何在服务器上设置邮件?你使用的是假脱机吗?你到底为什么要打印一个明文密码并在邮件中发送?你无法控制哪封邮件在离开CF服务器后以何种顺序发送。这是由邮件服务器控制的。您可能会将电子邮件转储到一个从上到下读取的队列中,因此(密码)中的最后一条消息将首先发送。检查邮件服务器配置。此外,为了回应TRose,通过电子邮件发送密码是一种非常糟糕的做法。这是您为他们设置的临时密码吗?如果是他们输入的密码,情况就更糟了。密码不应该是可读的、可恢复的或可逆的。此外,如果它是临时密码,它应该是非常临时的。如何在服务器上设置邮件?你使用的是假脱机吗?你到底为什么要打印一个明文密码并在邮件中发送?你无法控制哪封邮件在离开CF服务器后以何种顺序发送。这是由邮件服务器控制的。您可能会将电子邮件转储到一个从上到下读取的队列中,因此(密码)中的最后一条消息将首先发送。检查邮件服务器配置。此外,为了回应TRose,通过电子邮件发送密码是一种非常糟糕的做法。这是您为他们设置的临时密码吗?如果是他们输入的密码,情况就更糟了。密码永远不应该是可读的、可恢复的或可逆的。而且,如果它是临时密码,它应该是非常临时的。