20% OFF para compra e renovaÇÃo »

Autor Tópico: ScriptCase v9.1.000 (07/05/2018 06:59)  (Lida 1186 vezes)

Kleyber

  • Expert
  • *****
  • Mensagens: 3120
    • TK Informídia
Re:ScriptCase v9.1.000 (07/05/2018 06:59)
« Responder #15 Online: Maio 11, 2018, 05:10:59 pm »
Mas você já realizou o procedimento necessário na conta do Google, descrito neste video aqui: https://www.youtube.com/watch?v=uyy-RJk8YRo ?
Kleyber Derick

ITIL® V3 Foundation Certified
Analista de Sistemas
São Luís - Maranhão

rcsn1@hotmail.com

  • Novato
  • *
  • Mensagens: 45
    • Email
Re:ScriptCase v9.1.000 (07/05/2018 06:59)
« Responder #16 Online: Maio 15, 2018, 07:15:50 pm »
Fiz o procedimento na conta do Gmail, para ativar o uso eme ambiente menos seguro.

A ROTINA ESTÁ ASSIM:

// Email parameters
$mail_smtp_server    = 'smtp.gmail.com';          // SMTP server name or IP address
$mail_smtp_user      = 'xyz';      // SMTP user name
$mail_smtp_pass      = 'xyzxyzxyz';              // SMTP password
$mail_from               = 'xyz@gmail.com';   // From email
$mail_to                  = 'rcsn1@hotmail.com';        // To email
$mail_subject          = 'Test message';            // Message subject
$mail_message        = 'This is a test message.'; // Message body
$mail_format           = 'T';                       // 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              = '587';                     // Server port
$mail_tp_connection  = 'S';                       // Connection security (S) or (N)

// 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);

RETORNA ESTE ERRO:

Atenção
stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Atenção
stream_socket_client(): Failed to enable crypto
Atenção
stream_socket_client(): unable to connect to ssl://smtp.gmail.com:587 (Unknown error)
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\third\swift\classes\Swift\Transport\StreamBuffer.php:269 Stack trace: #0 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod\third\swift\classes\Swift\Transport\StreamBuffer.php(62): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod\third\swift\classes\Swift\Transport\AbstractSmtpTransport.php(113): Swift_Transport_StreamBuffer->initialize(Array) #2 C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod\third\swift\classes\Swift\Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #3 C:\Program Files\NetMake\v9\wwwroot\scriptcase\app\Ouvidoria\blank\index.php(1500): Swift_Mailer->send(Object(Swift_Message), Array) #4 C:\Program Files\NetMake\v9\wwwroot\scriptcase\app\Ouvidoria\blank\index.php(1819): blank_apl->controle() #5 {main} thrown in C:\Program Files\NetMake\v9\wwwroot\scriptcase\prod\third\swift\classes\Swift\Transport\StreamBuffer.php on line 269

Ronyan Alves

  • Administrator
  • Expert
  • *****
  • Mensagens: 979
Re:ScriptCase v9.1.000 (07/05/2018 06:59)
« Responder #17 Online: Maio 16, 2018, 09:11:02 am »
ta faltando um parâmetro na macro
"ssl".
--

Ronyan Alves
Equipe Scriptcase

rcsn1@hotmail.com

  • Novato
  • *
  • Mensagens: 45
    • Email
Re:ScriptCase v9.1.000 (07/05/2018 06:59)
« Responder #18 Online: Maio 16, 2018, 09:42:37 am »
Mais então tem que "reparar" no help do SC, pois copiei dos exemplos do próprio SC.

email - Send a simple e-mail

rcsn1@hotmail.com

  • Novato
  • *
  • Mensagens: 45
    • Email
Re:ScriptCase v9.1.000 (07/05/2018 06:59)
« Responder #19 Online: Maio 16, 2018, 10:14:08 am »
Pessoal, já tentei de tudo. Até com outro servidor SMTP e...... NADA. Por favor, onde tá o erro ?

sc_mail_send('smtp.gmail.com', 'raimundo@fiema.org.br', 'xxxxxx', 'raimundo@fiema.org.br', 'rcsn1@hotmail.com', 'assunto', 'mensagem', 'T', '', '', '587', 'T', '', 'TLS');

sc_mail_send('smtp.live.com','rcsn1@hotmail.com','xxxxxx','rcsn1@hotmail.com','raimundo@fiema.org.br','assunto','mensagem','T','','','587','T');

George Carvalho

  • Expert
  • *****
  • Mensagens: 1511
    • Email
Re:ScriptCase v9.1.000 (07/05/2018 06:59)
« Responder #20 Online: Maio 16, 2018, 10:41:03 am »
Acho que deveria ser aberto um tópico com o assunto.
George Carvalho
Porto de Galinhas/PE