2

I have install suiteCRM on my server.

  • I have configured the email smtp server on email module and it's work great.
  • I have put the same configuration informations in "set up email" in the campaign module.
  • I have add the cron command on my server.

But when i create a campaign the email stay in queue. I have a log error :

SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Sun Apr 16 22:53:14 2017 [25545][1][FATAL] SugarPHPMailer encountered an error: Vous n'avez pas configuré le serveur SMTP pour votre compte Mail. Configurer ou choir le serveur SMTP pour le compte Mail.
Sun Apr 16 22:53:14 2017 [25545][1][FATAL] SugarPHPMailer encountered an error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Sun Apr 16 22:53:14 2017 [25545][1][FATAL] Email delivery FAILURE:Array

I have tried to turn off firewall => it doesn't work

I have tried to change php version (5.6=> 5.5) => it doesn't work

Any ideas ? Thanks.

Remi Coste
  • 106
  • 7

1 Answers1

0

I have found a very crappy solution, it's work if you can send email from localhost without smtp external account :

Edit the file /modules/EmailMan/EmailManDelivery.php :

Comment email outbound setting from line 220 to 249 :

            // if user want to use an other outbound email account to sending...
//        if ($current_emailmarketing->outbound_email_id) {
//            $outboundEmailAccount = BeanFactory::getBean('OutboundEmailAccounts',
//                $current_emailmarketing->outbound_email_id);
//
//            if (strtolower($outboundEmailAccount->mail_sendtype) == "smtp") {
//                $mail->Mailer = "smtp";
//                $mail->Host = $outboundEmailAccount->mail_smtpserver;
//                $mail->Port = $outboundEmailAccount->mail_smtpport;
//                if ($outboundEmailAccount->mail_smtpssl == 1) {
//                    $mail->SMTPSecure = 'ssl';
//                } elseif ($outboundEmailAccount->mail_smtpssl == 2) {
//                    $mail->SMTPSecure = 'tls';
//                }
//                if ($outboundEmailAccount->mail_smtpauth_req) {
//                    $mail->SMTPAuth = true;
//                    $mail->Username = $outboundEmailAccount->mail_smtpuser;
//                    $mail->Password = $outboundEmailAccount->mail_smtppass;
//                }
//            } else {
//                $mail->Mailer = "sendmail";
//            }
//
//            $mail->oe->mail_smtpauth_req = $outboundEmailAccount->mail_smtpauth_req;
//            $mail->oe->mail_smtpuser = $outboundEmailAccount->mail_smtpuser;
//            $mail->oe->mail_smtppass = $outboundEmailAccount->mail_smtppass;
//            $mail->oe->mail_smtpserver = $outboundEmailAccount->mail_smtpserver;
//            $mail->oe->mail_smtpport = $outboundEmailAccount->mail_smtpport;
//            $mail->oe->mail_smtpssl = $outboundEmailAccount->mail_smtpssl;
//        }

And add this lines :

$mail->Mailer = "sendmail";
$mail->SMTPSecure = 'ssl';
$mail->SMTPAuth = true;

It's work for me.

Looking forward to a better solution

Remi Coste
  • 106
  • 7