Ive installed suiteCRM and sugarCRM previously and am having trouble getting a test email sent with both.
I keep getting the error “Error:SMTP connect() failed”.
I’m using Apache24 on a FreeNAS server and i want to use gmail for the outgoing server.
The outgoing mail server in suiteCRM is configured correctly.
To test my servers ability to send mail i have created a simple script PHP page which sends emails successfully.
This means my server is configured correctly and my php.ini must also be setup correctly.
For a reference the PHP code that works is…
<?php require("/usr/local/share/phpmailer/class.phpmailer.php"); require("/usr/local/share/phpmailer/class.smtp.php"); $mail = new PHPMailer(true); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure = 'tls'; // secure transfer enabled REQUIRED for GMail $mail->Host = 'smtp.gmail.com'; $mail->Port = 587; $mail->SMTPAutoTLS = false; $mail->SMTPOptions = array( 'ssl' => array( 'verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true ) ); $mail->Username = 'mattdmsa@gmail.com'; $mail->Password = 'stephaniesusan'; $mail->SetFrom('mattdmsa@gmail.com'); $mail->Subject = 'test'; $mail->Body = 'hello'; $mail->AddAddress('matthew@motion-solutions.com.au'); if(!$mail->Send()) { $error = 'Mail error: '.$mail->ErrorInfo; return false; } else { $error = 'Message sent!'; return true; } ?>Now without …
$mail->SMTPOptions = array(
‘ssl’ => array(
‘verify_peer’ => false,
‘verify_peer_name’ => false,
‘allow_self_signed’ => true
)
);
…the mail is not successful.
So ive tried modifying the relevant php files in suiteCRM with no success.
After a week on this im ready to re-imburse someone to sort it.
Any takers or of course better still for me some advice ?