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