SMTP 设置是否可以设置 SMTP 服务器以使用 JSL 通过 SMTP 中继发送电子邮件?查看 SAS 上的一些选项,但不确定如何使用 JSL 进行设置。谢谢
回复:SMTP 设置我只是尝试将其添加到上面示例中的字符串末尾,它起作用了:
-Attachments 'C:/file.txt'
完整的例子是:
Names Default To Here( 1 );
commands = {
"Send-MailMessage -From 'email@address' -To 'email@address' -Subject 'Test mail' -Body 'Message goes here' -SmtpServer smtp.server.com -Attachments 'C:/file.txt'\!n",
"exit\!n"
};
icommand = 0;
RP = Run Program(
Executable( "PowerShell.exe" ),
ReadFunction( Function( {this}, Write( this << Read ) ) ),
WriteFunction(
Function( {this},
icommand++;
If( icommand <= N Items( commands ),
this << Write( commands[icommand] );
,
this << WriteEOF;
);
)
)
);回复:SMTP 设置我的文章带有“-附件”功能以及相应的模型:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7.1
在一些好的物品中,我找不到邮件。 J我们可以使用 une mauvaise 操作或使用 une mauvaise 语法。
您是否曾使用过 SVP 的脚本应用程序示例?
回复:SMTP 设置您很可能可以使用所有不同的方法。 对于 PowerShell(我大部分时间都使用它),请参阅 Microsoft 文档。
回复:SMTP 设置你好,
评论 je peux faire pour rajouter une pièce-jointe dans le mail svp ?
回复:SMTP 设置如果您使用的是 Windows,这里有一个使用 powershell 的选项:
Names Default To Here( 1 );
commands = {
"Send-MailMessage -From 'email@address' -To 'email@address' -Subject 'Test mail' -Body 'Message goes here' -SmtpServer smtp.server.com\!n",
"exit\!n"
};
icommand = 0;
RP = Run Program(
Executable( "PowerShell.exe" ),
ReadFunction( Function( {this}, Write( this << Read ) ) ),
WriteFunction(
Function( {this},
icommand++;
If( icommand <= N Items( commands ),
this << Write( commands[icommand] );
,
this << WriteEOF;
);
)
)
);有关 powershell 实用程序的信息:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7.1
请注意,这需要 powershell 版本 2:
https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-the-windows-powershell-2.0-engine?view=powershell-7.1
回复:SMTP 设置明白了。 也许有一些帮助这个较早的线程。
回复:SMTP 设置感谢您的答复。当我使用 Mail() 函数时,电子邮件是通过 Outlook 客户端发送的,这会阻止我自动发送电子邮件。我正在尝试使用 SMTP 路由来避免使用 Outlook 客户端。有没有办法配置 mail() 函数以使用 SMTP 路由而不是 Outlook 客户端?
回复:SMTP 设置看一下“Mail()”命令。