I never had any problems with sc_mail_send until now. I am using SCv8.1
When I try to load my php script to send a mail, I get this error message
Can anyone help out? Please ! [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 mail.schoolnet.com.ng:25 (A socket operation was attempted to an unreachable host. )[/TD]
[/TR]
[/TABLE]
Fatal error: Uncaught exception ‘Swift_TransportException’ with message ‘Connection could not be established with host mail.schoolnet.com.ng [A socket operation was attempted to an unreachable host. #10065]’ in D:\hshome qaglobal\schoolnet.com.ng_lib\prod hi rd\swift\classes\Swift\Transport\StreamBuffer.php: 269 Stack trace: #0 D:\hshome qaglobal\schoolnet.com.ng_lib\prod hi rd\swift\classes\Swift\Transport\StreamBuffer.php( 62): Swift_Transport_StreamBuffer->_establishSocketConnection() #1 D:\hshome qaglobal\schoolnet.com.ng_lib\prod hi rd\swift\classes\Swift\Transport\AbstractSmtpTrans port.php(113): Swift_Transport_StreamBuffer->initialize(Array) #2 D:\hshome qaglobal\schoolnet.com.ng_lib\prod hi rd\swift\classes\Swift\Mailer.php(79): Swift_Transport_AbstractSmtpTransport->start() #3 D:\hshome qaglobal\schoolnet.com.ng\blank_sendmai l\index.php(964): Swift_Mailer->send(Object(Swift_Message), Array) #4 D:\hshome qaglobal\schoolnet.com.ng\blank_sendmai l\index.php(1251): blank_sendmail_apl->controle() #5 {main} in D:\hshome qaglobal\schoolnet.com.ng_lib\prod hi rd\swift\classes\Swift\Transport\StreamBuffer.php on line [B]269
My code onExecute (using a blank on scriptcase)[/B]
// Email message body
{cus_body} = "
<div style =‘font:12px Arial,tahoma,sans-serif;color:#000000’> If you did not log on to your profile at the time detailed above, please call our Helpdesk Centre on: .
<br /><br /></div>
<div style =‘font:12px Arial,tahoma,sans-serif;color:#000000’> Thank you.
<br /><br /></div>" ;
// Email parameters
$mail_smtp_server = ‘mail.schoolnet.com.ng’; // SMTP server name or IP address
$mail_smtp_user = ‘info@schoolnet.com.ng’; // SMTP user name
$mail_smtp_pass = ‘iloveJesus’; // SMTP password
$mail_from = ‘info@schoolnet.com.ng’; // From email
$mail_to = ‘abbygad@gmail.com’; // To email
$mail_message = {cus_body};
$mail_subject = ‘ICP: LOGIN CONFIRMATION’;
$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 = ‘25’; // Server port
$mail_tp_connection = ‘N’; // 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);