B1G Mailserver & PHPMailerClass

Kufstein

B1G-Software-Kunde
#1
Hallöchen zusammen

Ich stehe vor folgendem Problem.
Ich habe ein Newsletter Dienst, wo verschiedene E-Mails versendet werden.
Zuerst habe ich dies mit der Funktion mail() in PHP realsiert. Allerdings hat GMX damit ein Problem. Alle GMX-Adressen bekommen diese Mails nicht.
Also habe ich gedacht, ich nutze den B1GMailserver und den PHPMailerClass zum versenden der Mails. Allerdings hat er irgendein Problem mit dem TLS.
Ich verstehe nur nicht welches. Mein Code sieht wie folgt aus:

PHP:
try {
  $mail->Host       = "localhost"; // SMTP server
  $mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
 //  $mail->SMTPSecure = 'TLS';
  $mail->SMTPAuth   = true;                  // enable SMTP authentication
  $mail->Port       = 25;                    // set the SMTP port for the  server
  $mail->Username   = "noreply@meinedomain.com"; // SMTP account username
  $mail->Password   = "passwort";        // SMTP account password
  $mail->AddReplyTo('noreply@meinedomain.com', 'Casa-Ay-Caramba');
  $mail->AddAddress($ary['email'], 'EIN NAME');
  $mail->SetFrom('noreply@meinedomain', 'NAME');
  $mail->Subject = $language['sys_newsletter_msgheadline'];
  $mail->AltBody = $persmsg; // optional - MsgHTML will create an alternate automatically
  $mail->IsHTML(false);
  $mail->msgHTML($persmsg);
  $mail->ContentType = 'text/plain'; 
  $mail->Send();
} catch (phpmailerException $e) {
  $rtnmsg[0] = $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
  $rtnmsg[1] = $e->getMessage(); //Boring error messages from anything else!
}
Der Fehler im Debug der Klasse sieht wie folgt aus:
Code:
2016-04-17 14:38:49	SERVER -> CLIENT: 220 mail.meiserver.ch Hey Baby.. I am ready for you.. [bMS-2.7.3221] 2016-04-17 14:38:49	CLIENT -> SERVER: EHLO develop.meinserver.com 2016-04-17 14:38:49	SERVER -> CLIENT: 250-mail.meinserver.ch Pleased to meet you, 127.0.0.1 [127.0.0.1] 250-SIZE 209715200 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-STARTTLS 250 8BITMIME 2016-04-17 14:38:49	CLIENT -> SERVER: STARTTLS 2016-04-17 14:38:49	SERVER -> CLIENT: 220 Begin TLS negotiation Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in pfad/zur/website/class/class.smtp.php on line 344 2016-04-17 14:38:49	SMTP Error: Could not connect to SMTP host. 2016-04-17 14:38:49	CLIENT -> SERVER: QUIT 2016-04-17 14:38:49	SERVER ->
Im B1GMailserver LOG steht folgendes:
Code:
	SMTP	#31782 - [127.0.0.1] Disconnected (inbound: 0 / outbound: 0)	Heute, 16:38:49
	SMTP	#31782 - [127.0.0.1] QUIT	Heute, 16:38:49
	SMTP	#31782 - [127.0.0.1] TLS negotiation failed (SSL error)	Heute, 16:38:49
	SMTP	#31782 - [127.0.0.1] STARTTLS	Heute, 16:38:49
	SMTP	#31782 - [127.0.0.1] EHLO develop.meinserver.com	Heute, 16:38:49
	SMTP	#31782 - [127.0.0.1] Connected
Es scheint irgendwas mit den SSL Zertifikat zu tuen zu haben?

Hat jemand sowas ähnliches im Einsatz oder eine Idee?

Danke und Gruss
 

Kufstein

B1G-Software-Kunde
#2
Okay ich glaub ich habs gelöst.

Code:
 	$mail->SMTPOptions = array(
    'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true
    )
 
Top