configuración SMTP¿Es posible configurar un servidor SMTP para enviar correo electrónico a través de retransmisión SMTP utilizando JSL?Vea algunas opciones en SAS pero no está seguro de cómo configurarlas usando JSL.Gracias
Re: configuración SMTPIntenté agregar esto al final de la cadena en mi ejemplo anterior y funcionó:
-Attachments 'C:/file.txt'
El ejemplo completo sería:
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;
);
)
)
);Re: configuración SMTPHe probado con la función «-Attachment» siguiendo el modelo de este gravamen:
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. j E dois faire una mauvaise manipulación o utilizar una mauvaise sintaxis.
¿Tienes un ejemplo de guión que hace una llamada a una pieza conjunta de SVP?
Re: configuración SMTPLo más probable es que puedas hacerlo con todos los diferentes métodos. Para PowerShell (que uso la mayor parte del tiempo), consulte la documentación de Microsoft.
Re: configuración SMTPBuen día,
Comment je peux faire pour rajouter une pièce-jointe dans le mail svp ?
Re: configuración SMTPSi estás en Windows, aquí tienes una opción usando 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;
);
)
)
);Información sobre la utilidad powershell:
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7.1
Tenga en cuenta que esto requiere la versión 2 de PowerShell:
https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-the-windows-powershell-2.0-engine?view=powershell-7.1
Re: configuración SMTPComprendido. Tal vez haya algo de ayuda en este hilo anterior .
Re: configuración SMTPGracias por la respuesta.Cuando uso la función Mail(), el correo electrónico se envía a través del cliente Outlook, que bloquea el envío automático de correo electrónico.Estoy intentando utilizar el enrutamiento SMTP para evitar el uso del cliente Outlook.¿Hay alguna manera de configurar la función mail() para usar el enrutamiento SMTP en lugar del cliente Outlook?
Re: configuración SMTPEche un vistazo al 'Correo()' dominio .