error en sc_send_mail scriptcase 9

Hola, a partir de la version 9 de scriptcase la funcion sc_send_mail ,e da error de certificados de SSL al intentar conectar al servidor smtp smtp.gmail.com
Les paso el script:

$mail_smtp_server = ‘smtp.gmail.com’; // SMTP server name or IP address
$mail_smtp_user = ‘Userlogin’; // SMTP user name
$mail_smtp_pass = ‘PasswordLoginSMTP’; // SMTP password
$mail_from = ‘mailfrom@mailfrom.com’; // From email
$mail_to = ‘mailto@mailto.com’; // To email
$mail_subject = ‘mail de prueba’; // Message subject
$mail_message = ‘prueba’; // Message body
$mail_format = ‘H’; // Message format: (T)ext or (H)tml
$mail_copies = ‘’; // List of the emails that will recieve the message
$mail_tp_copies = ‘’; // Type copies: BCC (Hiden copies) or CCC (Regular copies)
$mail_port = ‘465’; // Server port
$mail_tp_connection = ‘S’; // Connection security (S) or (N)
$mail_attach=’’;

// Send email";
sc_mail_send($mail_smtp_server,
$mail_smtp_user,
$mail_smtp_pass,
$mail_from,
$mail_to,
$mail_subject,
$mail_message,
$mail_format,
$mail_copies,
$mail_tp_copies,
$mail_port,
$mail_tp_connection);

Al ejecutarlo me da el siguiente error: [TABLE=“class: scErrorTable, align: center, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“class: scErrorTitle, align: left”]Error[/TD]
[/TR]
[TR]
[TD=“class: scErrorMessage, align: center”]stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed[/TD]
[/TR]
[/TABLE]
[TABLE=“class: scErrorTable, align: center, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“class: scErrorTitle, align: left”]Error[/TD]
[/TR]
[TR]
[TD=“class: scErrorMessage, align: center”]stream_socket_client(): Failed to enable crypto[/TD]
[/TR]
[/TABLE]
[TABLE=“class: scErrorTable, align: center, cellpadding: 0, cellspacing: 0”]
[TR]
[TD=“class: scErrorTitle, align: left”]Error[/TD]
[/TR]
[TR]
[TD=“class: scErrorMessage, align: center”]stream_socket_client(): unable to connect to ssl://smtp.gmail.com:465 (Unknown error)[/TD]
[/TR]
[/TABLE]
Fatal error: Uncaught Swift_TransportException: Connection could not be established with host smtp.gmail.com [ #0] in C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\StreamBuffer.php:269 Stack trace: #0 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\StreamBuffer.php(62): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\AbstractSmtpTransport.php(113): Swift_Transport_StreamBuffer->initialize(Array) #2 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #3 C:\Program Files\NetMake\v9\wwwroot\scriptcase\app\doloop\pru_mail\index.php(1560): Swift_Mailer->send(Object(Swift_Message), Array) #4 C:\Program Files\NetMake\v9\wwwroot\scriptcase\app\doloop\pru_mail\index.php(1879): pru_mail_apl->controle() #5 {main} thrown in C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\StreamBuffer.php on line 269

Esta misma aplicacion esta funcionando en ScriptCase 8.1, chequee y esta habilitado el servicio open_ssl, alguien sabe el porque del error?
Gracias

Hello Doloop, I got same problem and unfortunately I’m not a tech person so I’m in trouble… No way to send mail with 9
Did you fix the problem by yourself ??? Could you say how ? Thanks

$mail_smtp_server = ‘smtp.gmail.com’;
$mail_smtp_user = ‘xxxxxxxxxxxxx@gmail.com’;
$mail_smtp_pass = ‘xxxxxxxxxxx’; // SMTP password libero
$mail_from = ‘mymail@gmail.com’; // From email
$mail_to = ‘mymail@libero.it’ ; // {select mail} ; // To email
$mail_subject = 'Notifica inserimento SCHEDA GARA NR. '. [glo_idTrack] ; // Message subject
$mail_message = 'bla bla bla ';
$mail_format = ‘H’; // Message format: (T)ext or (H)tml
$mail_copies = ‘’; // List of the emails that will recieve the message
$mail_tp_copies = ‘’; // Type copies: BCC (Hiden copies) or CCC (Regular copies)
$mail_port = ‘465’; // Server port
$mail_tp_connection = ‘N’;

This is the last of many test :

Fatal error: Uncaught Swift_TransportException: Connection to smtp.gmail.com:465 Timed Out in C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\AbstractSmtpTransport.php:404 Stack trace: #0 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\AbstractSmtpTransport.php(289): Swift_Transport_AbstractSmtpTransport->_getFullResponse(0) #1 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\AbstractSmtpTransport.php(117): Swift_Transport_AbstractSmtpTransport->_readGreeting() #2 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #3 C:\Program Files\NetMake\v9\wwwroot\scriptcase\app\MYSQL_EOS_GARE\mails_select_list\mails_select_list_apl.php(1708): Swift_Mailer->send(Object(Swift_Message), Array) #4 C:\Program Files\NetMake\v9\wwwroot\scriptcase\app\MYSQL_EOS_GARE\mails_select_list\mails_select_list_apl.php(1097): mails_select_list_a in C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\AbstractSmtpTransport.php on line 404

I’m using the sendmail macro in SC9 without any problems. Just try another mailserver. Most of the mailservers refuse an unsecure connection, so the connection needs to be set to ‘S’
$mail_tp_connection = ‘S’;

hello i have got same problem and unfortunately I’m not a tech person so I’m in trouble… No way to send mail with 9
Did you fix the problem by yourself ??? Could you say how ? Thanks

With more and more parametre is ever and ever false please
somebody help me

Best regards

  1. Maybe the following post in the knowledge base will help:

https://support.scriptcase.net/en-us/article/1154-problems-sending-emails

  1. Gmail on the other hand has two different ways to authenticate. This is a setting in the Google account!
    You should try the less secure one, which is similar to most other smtp servers.

  2. There might be some other bottle necks, for example the firewall on your server :confused:
    Just try using other smtp servers to check if it’s something like this.

Hope this may help.

Best regards

Gunter Eibl
scriptcase.coach (Germany)

hello gunter i try with anather smtp but with no way . auth.1and1.smtp.fr no way to. smtp.gmail.com
the same error . it’s very difficult to send a email with scriptcase , it’s a wrong thing !
best regards gunter