Sending mail error

I try to send mail but this fatal error appears:

Fatal error: Uncaught exception ‘Swift_TransportException’ with message ‘Connection could not be established with host smtp.example.com [php_network_getaddresses: getaddrinfo failed: H?te inconnu. #0]’ in C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\StreamBuffer.php:265 Stack trace: #0 C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\StreamBuffer.php(66): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\AbstractSmtpTransport.php(117): Swift_Transport_StreamBuffer->initialize(Array) #2 C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod hird\swift\classes\Swift\Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #3 C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\app\AFFAIRES\PECH_AFFAIRES_TOUT\PECH_AFFAIRES_TOUT_apl.php(5710): Swift_Mailer->send(Object(Swift_Message), Array) #4 C:\Program Files (x86)\N in C:\Program Files (x86)\NetMake\v7\wwwroot\scriptcase\prod hird\swift\classes\Swift\Transport\StreamBuffer.php on line 265

And this is my code:

$smtp = “smtp.gmail.com”; //smtp address
$usr = “ism88h@gmail.com”; //User name
$pw = “ababab”; //Password
$out = “ism88h@gmail.com”; //message from
$in = “i.hadhami@gmail.com”; //message to
$sbj = “Sending email using Scriptcase”; //Subject
$msg = “Bonjour”; //body message
sc_mail_send ($smtp, $usr, $pw, $out, $in, $sbj, $msg, ‘T’, ‘’, ‘’, ‘25’);

Please can you help me? thanks

Gmail requires a secure connection. Add the following parameters below.

$mail_port		  = '465';
$mail_ssl		  = 'S';

Then include them in the sc command:
sc_mail_send($mail_smtp_server,
$mail_smtp_user,
$mail_smtp_pass,
$mail_from,
$mail_to,
$mail_subject,
$mail_message,
$mail_format,
‘’,
‘’,
$mail_port,
$mail_ssl);

the same problem still even i change the prot.
I’m using a virtual machine VMware.
Are there some settings for vmware to usse scriptcae sending mail ?

$mail_port = ‘465’;
$mail_ssl = ‘S’;

Then include them in the sc command:
sc_mail_send($mail_smtp_server,
$mail_smtp_user,
$mail_smtp_pass,
$mail_from,
$mail_to,
$mail_subject,
$mail_message,
$mail_format,
‘’,
‘’,
$mail_port,
$mail_ssl);

Thank you it’s ok now

I have the same problem, I checked that in the server the ssl plugin is enabled.

I don’t have other idea for solve this problem…please HELP!!

Even I get similar message:

Fatal error: Uncaught exception ‘Swift_TransportException’ with message ‘Failed to authenticate on SMTP server with username “aa.email@gmail.com” using 2 possible authenticators’ in