sendmail.exe
是一个简单的windows控制台应用程序,它模拟了sendmail的选项,用于传递通过stdin传输的电子邮件。-t
它旨在简化已硬编码为电子邮件传递手段的unix代码的运行。/usr/lib/sendmail
它不支持延迟传递,并且需要 smtp 服务器来执行邮件的实际传递。
安装
-
下载邮件.zip并解压缩其内容
-
在安装了 unix 应用程序的驱动器上复制 和 到。例如。如果应用程序安装在 中,并且需要复制到 和。
sendmail.exe
sendmail.ini
\usr\lib
c:\bugzilla
sendmail.exe
sendmail.ini
c:\usr\lib\sendmail.exe
c:\usr\lib\sendmail.ini
-
在 中配置 smtp 服务器和缺省域。
sendmail.ini
使用邮件
通常,您需要做的就是在 中安装,调用的现有代码将起作用。sendmail.exe
\usr\lib
/usr/lib/sendmail
如果您正在编写新应用程序,您需要做的就是使用完整的标头构建电子邮件,然后将其通过管道传输到/usr/lib/sendmail -t
例如,从命令行使用假邮件:
@ECHO OFFREM send email from command line via SMTP with sendmail
ECHO From: byron@example.com > %TEMP%\temp.mail
ECHO To: someone-else@example.com >> %TEMP%\temp.mail
ECHO Subject: this is a test >> %TEMP%\temp.mail
ECHO.>> %TEMP%\temp.mail
ECHO testing. >> %TEMP%\temp.mail
ECHO blah blah.. >> %TEMP%\temp.mail
ECHO.>> %TEMP%\temp.mail
ECHO blah. >> %TEMP%\temp.mail
sendmail -t < %TEMP%\temp.mail
DEL %TEMP%\temp.mail
注意:在文件中放置一个空行,而不是一个带有单个句点的行。ECHO.
注意:如果您安装了IIS,则可以在没有任何第三方程序的情况下发送电子邮件(您不需要我的sendmail包装器)。
@ECHO OFF
REM send email from command line via IIS
REM change this path to point to IIS's pickup directory
SET root=c:\InetPub\MailRoot\Pickup
REM set up temp and eml filenames
IF NOT EXIST %root%\temp MKDIR %root%\temp
:setTempFileName
SET tmp=%RANDOM%
IF EXIST %root%\temp\%tmp%.tmp GOTO setTempFileName
SET eml=%root%\%tmp%.eml
SET tmp=%root%\temp\%tmp%.tmp
REM build the email. ^ is the escape character
ECHO From: bob.smith@example.com> %tmp%
ECHO To: sally.jones@example.com>> %tmp%
ECHO Subject: Example>> %tmp%
ECHO Content-Type: text/html>> %tmp%
ECHO.>> %tmp%
ECHO ^<b^>This is a test^</b^> >> %tmp%
REM move the temp file into the pickup directory for delivery
RENAME %tmp% %eml%
<td>
<img src="https://www.glob.com.au/favicon.ico" width="16" height="16"/>
<a target="_blank" href="https://www.glob.com.au/sendmail/">sendmail</a>
</td>
下载链接:
下载https://download.csdn.net/download/huxyc/76124445 下载
参考文献:
假的发送邮件窗口 (glob.com.au)https://www.glob.com.au/sendmail/
(1条消息) PHP sendMail 发送邮件_PHP开发-CSDN博客_php sendmailhttps://blog.csdn.net/csdn_zhongwu/article/details/101024726PHP实现在windows下配置sendmail并通过mail()函数发送邮件的方法_php技巧_脚本之家 (jb51.net)https://www.jb51.net/article/116652.htm