尝试将PHP脚本的内容输出到电子邮件时遇到问题。 每次我尝试,无论方法如何,输出总是最终作为附件。 我当时认为它可能与HTML有关。 但是当通过邮件传递-html时,我仍面临着同样的问题。
我尝试过的一些事情:
ftp_jar=${Utils_home}/bin/ftpClientUtil.jar
net_jar=${Utils_home}/bin/commons-net-3.3.jar
jsch_jar=${Utils_home}/bin/jsch-0.1.51.jar
java -cp .:$jsch_jar:$net_jar:$ftp_jar com.myplace.ftputils.SFTPClientUtil $*
这给了我一个附件,文件中包含以下内容:
Cron254=$(php httpdocs/DIR/Cron-Run.php) | echo $Cron254 | mail -s "cron output" email@domain.com <<< $Cron254
我也试过这个简单的方法:
<b> 00 Days, 00 Hours, 37 Minutes, and 11 Seconds have passed since the session was started </b>
<br/>
This script will auto end in 3 hours (180 minutes) its possible the time may need extending the more data that is on the website <br />
Todays Timestamp: 20160229142124
<br />
Todays Timestamp -180 minutes: 20160229112124
<br />
session already in progress
<br />
我可以找到1000种方法,但每种方式都会将文件附加到电子邮件中。