ep3-bs icon indicating copy to clipboard operation
ep3-bs copied to clipboard

Mail probleme

Open StefanHeid opened this issue 5 years ago • 8 comments

Das Tool ist echt klasse. Aber leider komme ich mit der Mail Konfiguration nicht zurecht. Ich habe alle Tipps in den verschiedenen Comments versucht. Ich bekomme immer folgenden Fehler: "An exception was raised while creating "Zend\Mail\Protocol\Smtp\Auth\Plain", no instance returned"

Originally posted by @StefanHeid in https://github.com/tkrebs/ep3-bs/issues/246#issuecomment-621464783

StefanHeid avatar Apr 30 '20 13:04 StefanHeid

Wenn ich den Debug mode in der Init.php auf true setze, funktioniert die Mail Zustellung einwandfrei. Bei Neuregistrierung und Buchung bekomme ich keine Fehlermeldung mehr und die Mails werden zugestellt. Da dann aber einiges an Meldungen kommt, ist das natürlich nicht die Lösung.

StefanHeid avatar Apr 30 '20 13:04 StefanHeid

Sorry bin ein Neuling

StefanHeid avatar Apr 30 '20 13:04 StefanHeid

Kannst du hier mal den Mail-Abschnitt aus deiner Konfiguration zeigen, aber - ganz wichtig - nur den Mail-Abschnitt und ohne Passwort:

https://github.com/tkrebs/ep3-bs/blob/master/config/autoload/local.php.dist#L18

tkrebs avatar Apr 30 '20 16:04 tkrebs

Auch bei meiner Konfiguration funktioniert die Mail Zustellung nur, wenn in der init.php auf der debug mode auf true gesetzt ist: define('EP3_BS_DEV_TAG', true);

Hier meine Konfiguration in der local.php ` 'mail' => array( 'type' => 'sendmail', // or 'smtp' or 'smtp-tls' 'address' => '[email protected]',

    'host' => '?', // for 'smtp' type only, otherwise remove or leave as is
    'user' => '?', // for 'smtp' type only, otherwise remove or leave as is
    'pw' => '?', // for 'smtp' type only, otherwise remove or leave as is

    'port' => 'auto', // for 'smtp' type only, otherwise remove or leave as is
    'auth' => 'plain', // for 'smtp' type only, change this to 'login' if you have problems with SMTP authentication
),`

Habe es auch mit smtp versucht - gleiches Ergebnis: ist EP3_BS_DEV_TAG auf true gesetzt funktioniert alles problemlos, wenn auf false gesetzt keine Mailversendung und zahlreiche Fehlermeldungen.

milack68 avatar May 01 '20 09:05 milack68

Die Maileinstellungen sind identisch wie bei milack68. Bei Debug true hatte ich aber eine Meldung oben in Webansicht. Diese habe ich aber mit Umstellung auf Php7.2 wegbekommen.

StefanHeid avatar May 01 '20 10:05 StefanHeid

Welchen E-Mail-Versand-Typ hast du in dieser Zeile konfiguriert:

https://github.com/tkrebs/ep3-bs/blob/master/config/autoload/local.php.dist#L19

Standard ist sendmail, deine Fehlermeldung deutet aber auf smtp hin.

tkrebs avatar May 04 '20 13:05 tkrebs

Anbei die Einstellungen in der local.php: mail' => array( 'type' => 'sendmail', // or 'smtp' or 'smtp-tls' or 'sendmail' 'address' => '[email protected]',

    'host' => '?', // for 'smtp' type only, otherwise remove or leave as is
    'user' => '?', // for 'smtp' type only, otherwise remove or leave as is
    'pw' => '?', // for 'smtp' type only, otherwise remove or leave as is

    'port' => 'auto', // for 'smtp' type only, otherwise remove or leave as is
    'auth' => 'plain', // for 'smtp' type only, change this to 'login' if you have problems with SMTP authentication

StefanHeid avatar May 04 '20 19:05 StefanHeid

Hänge mich hier mal mit ran - wenn define('EP3_BS_DEV_TAG', true); gesetzt ist, klappt alles wunderbar - Emails werden versendet nach einer Buchung eines Users.

Sobald ich aber define('EP3_BS_DEV_TAG', false); setze kommt es bei einer Buchung zu einem Gateway Timeout.

Gateway Timeout
The gateway did not receive a timely response from the upstream server or application.

Das error log vom Server sagt dazu:

[Tue Apr 09 10:07:15.813567 2024] [proxy_fcgi:error] [pid 973624:tid 140068161296064] (70007)The timeout specified has expired: [client xxx.xxx.xx.xxx:0] AH01075: Error dispatching request to : (polling)

Meine Email-Einstellungen

'mail' => array(
        'type' => 'smtp-tls', // or 'smtp' or 'smtp-tls' (or 'file', to not send, but save to file (data/mails/))
        'address' => '[email protected]',
            // Make sure 'bookings.example.com' matches the hosting domain when using type 'sendmail'

        'host' => 'mail.meinedomain.de', // for 'smtp' type only, otherwise remove or leave as is
        'user' => '[email protected]', // for 'smtp' type only, otherwise remove or leave as is
        'pw' => '<MEIN_PASSWORT>', // for 'smtp' type only, otherwise remove or leave as is

        'port' => '587', // for 'smtp' type only, otherwise remove or leave as is
        'auth' => 'login', // for 'smtp' type only, change this to 'login' if you have problems with SMTP authentication

Heart1010 avatar Apr 09 '24 08:04 Heart1010