我使用ASP经典通过msmtp发送电子邮件。然而,下列任何一项工作
set objShell = CreateObject("WScript.Shell")
objShell.Run "%COMSPEC% /C echo ""hello world"" | c:\path\to\msmtp.exe recipient@mail.com" , 0, true
objShell.Run "%COMSPEC% /C ""echo hello world"" | ""c:\path\to\msmtp.exe"" ""recipient@mail.com""" , 0, true
objShell.Run "%COMSPEC% /C ""echo hello world | c:\path\to\msmtp.exe recipient@mail.com""" , 0, true
objShell.Run "%COMSPEC% /C echo hello world | c:\path\to\msmtp.exe recipient@mail.com" , 0, true发布于 2014-03-23 16:12:48
通过授予IUSR访问msmtp使用的配置文件的权限来解决问题。那么语法就能正常工作了。
objShell.Run "%COMSPEC% /C echo ""hello world"" | c:\path\to\msmtp.exe recipient@mail.com" , 0, truehttps://stackoverflow.com/questions/22575516
复制相似问题