SMTP 설정JSL을 사용하여 SMTP 릴레이를 통해 이메일을 보내도록 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 설정J'ai 에세이 avec la fonction « -Attachment » en suivant le modèle de ce lien:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7.1
En indiquant le bon chemin d'accès, je ne reçois pas de mail. 제이 e dois faire une mauvaise 조작 또는 une mauvaise 구문을 활용합니다.
avez-vous un exemple de script faisant appel à une pièce-jointe 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 클라이언트를 통해 이메일이 전송됩니다.Outlook 클라이언트 사용을 피하기 위해 SMTP 라우팅을 사용하려고 합니다.Outlook 클라이언트 대신 SMTP 라우팅을 사용하도록 mail() 기능을 구성하는 방법이 있습니까?
답: SMTP 설정'Mail()'을 살펴보세요. 명령 .