# Emailversandt durch Shopware + Gmail/Strato unmöglich, aber möglich durch Kommandozeile

**URL:** <https://forum.shopware.com/t/emailversandt-durch-shopware-gmail-strato-unmoglich-aber-moglich-durch-kommandozeile/53078>\
**Category:** Administration\
**Created:** [24. Mai 2018 um 13:37 UTC](https://forum.shopware.com/t/emailversandt-durch-shopware-gmail-strato-unmoglich-aber-moglich-durch-kommandozeile/53078 "2018-05-24T13:37:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rreimche](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rreimche](https://forum.shopware.com/u/rreimche)\
**Post date:** [24. Mai 2018 um 13:37 UTC](https://forum.shopware.com/t/emailversandt-durch-shopware-gmail-strato-unmoglich-aber-moglich-durch-kommandozeile/53078/1 "2018-05-24T13:37:19Z")

</div>

Hallo,

ich habe die letzten 2 Stunden mit den Einstellungen vom Mail gespielt. Ich habe zunächst unterschiedliche Felder an Gmail anzupassen versucht. Ich habe server ([smtp.gmail.com/smtp-relay.gmail.com/smtp.strato.de](http://smtp.gmail.com/smtp-relay.gmail.com/smtp.strato.de)), Port und Verbindungs Präfix (465 und&nbsp;ssl oder 587 und&nbsp;tls) sowie Verbindungs-Authentifizierung (keine Angebe&nbsp;/ plain / login) geändert. Bei den Versuchen mit Gmail bekomme ich immer “exception ‘Zend\_Mail\_Protocol\_Exception’ with message ‘Connection timed out’ in /engine/Library/Zend/Mail/Protocol/Abstract.php:273” und bei Strato anscheinend keine Meldung im Log. Ich habe dieselben Einstellungen mit 587/TLS in Apple Mail probiert sowohl für Gmail als auch für Strato und da ging es reibungslos.&nbsp;

Was könnte das Problem sein?

Viele Grüße  
Roman

---

<div class="post-metadata">

**Author:** ![rreimche](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rreimche](https://forum.shopware.com/u/rreimche)\
**Post date:** [24. Mai 2018 um 14:22 UTC](https://forum.shopware.com/t/emailversandt-durch-shopware-gmail-strato-unmoglich-aber-moglich-durch-kommandozeile/53078/2 "2018-05-24T14:22:11Z")

</div>

Jetzt noch mehr Merkwürdigkeit: keine Connect durch sendemal, aber es gibt Connect mit telnet.

```
[rreimche@mysrv ~]$ sendemail -l email.log \
> -f "from_email@gmail.com" \
> -u "Email Subject 1" \
> -t "to_email@gmail.com" \
> -s "smtp.gmail.com:587" \
> -o tls=yes \
> -xu "from_email@gmail.com" \
> -xp "mypasswort" \
> -m "Test"

May 24 16:15:26 frontsignparts sendemail[22723]: ERROR => Timeout while connecting to smtp.gmail.com:587 There was no response after 60 seconds.
NOTICE: The log file [email.log] does not exist. Creating it now with mode [0600].

[rreimche@mysrv ~]$ ping smtp.gmail.com
PING gmail-smtp-msa.l.google.com (173.194.76.108) 56(84) bytes of data.
64 bytes from ws-in-f108.1e100.net (173.194.76.108): icmp_seq=1 ttl=48 time=7.92 ms
64 bytes from ws-in-f108.1e100.net (173.194.76.108): icmp_seq=2 ttl=48 time=7.42 ms
64 bytes from ws-in-f108.1e100.net (173.194.76.108): icmp_seq=3 ttl=48 time=7.38 ms
64 bytes from ws-in-f108.1e100.net (173.194.76.108): icmp_seq=4 ttl=48 time=7.36 ms

[rreimche@mysrv ~]$ telnet smtp.gmail.com 587
Trying 2a00:1450:400c:c00::6c...
telnet: connect to address 2a00:1450:400c:c00::6c: Connection timed out
Trying 173.194.76.109...
Connected to smtp.gmail.com.
Escape character is '^]'.
220 smtp.gmail.com ESMTP n3-v6sm17204845wrp.14 - gsmtp
```

---

<div class="post-metadata">

**Author:** ![rreimche](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rreimche](https://forum.shopware.com/u/rreimche)\
**Post date:** [24. Mai 2018 um 14:29 UTC](https://forum.shopware.com/t/emailversandt-durch-shopware-gmail-strato-unmoglich-aber-moglich-durch-kommandozeile/53078/3 "2018-05-24T14:29:45Z")

</div>

Und von meinem Laptop wieder reibungslos:

&nbsp;

```
 broadcast_algorithms git:(ex2) sendemail -f "from_email@gmail.com" -u "Test" -t "to_email@gmail.com" -s "smtp.gmail.com:587" -o tls=yes -xu "from_email@gmail.com" -xp "passwort" -m "Test"
May 24 16:27:20 eduroam-ipv4-5-0856 sendemail[4972]: Email was sent successfully!

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![rreimche](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rreimche](https://forum.shopware.com/u/rreimche)\
**Post date:** [24. Mai 2018 um 14:46 UTC](https://forum.shopware.com/t/emailversandt-durch-shopware-gmail-strato-unmoglich-aber-moglich-durch-kommandozeile/53078/4 "2018-05-24T14:46:03Z")

</div>

Das Problem war, dass mein Hoster die ausgehened SMTP-Verbindungen durch IPv6 blockiert. Darüber gibt es einen Artikel in&nbsp;[cloudsupport](https://cloudsupport.digitalocean.com/s/) namens “My outgoing mail seems to be blocked, what can I do?”.

Die Lösung: In /etc/gai.conf muss “precedence ::ffff:0:0/96 100” hinzugefügt/abkommentiert&nbsp;werden, damit IPv4-Verbindungen bevorzugt werden.

---

<div class="post-metadata">

**Author:** ![rreimche](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rreimche](https://forum.shopware.com/u/rreimche)\
**Post date:** [24. Mai 2018 um 15:04 UTC](https://forum.shopware.com/t/emailversandt-durch-shopware-gmail-strato-unmoglich-aber-moglich-durch-kommandozeile/53078/5 "2018-05-24T15:04:22Z")

</div>

Leider werden jetzt Email problemlos durch Kommandozeile versandt, aber noch nicht durch Shopware:

```
[rreimche@myserv ~]$ sendemail -f "email_from@gmail.com" -u "Test" -t "email_to@gmail.com" -s "smtp.gmail.com:587" -o tls=yes -xu "email_from@gmail.com" -xp "passwort" -m "Test"
*******************************************************************
 Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
 is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
 possibly with SSL_ca_file|SSL_ca_path for verification.
 If you really don't want to verify the certificate and keep the
 connection open to Man-In-The-Middle attacks please set
 SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
  at /usr/bin/sendemail line 1933.
May 24 16:42:50 frontsignparts sendemail[22903]: Email was sent successfully!

[rreimche@frontsignparts ~]$ sendemail -f "no-reply@myserv.de" -u "Test" -t "email_to@gmail.com" -s "smtp.strato.de:587" -o tls=yes -xu "no-reply@myserv.de" -xp "passwort" -m "Test"
*******************************************************************
 Using the default of SSL_verify_mode of SSL_VERIFY_NONE for client
 is deprecated! Please set SSL_verify_mode to SSL_VERIFY_PEER
 possibly with SSL_ca_file|SSL_ca_path for verification.
 If you really don't want to verify the certificate and keep the
 connection open to Man-In-The-Middle attacks please set
 SSL_verify_mode explicitly to SSL_VERIFY_NONE in your application.
*******************************************************************
  at /usr/bin/sendemail line 1933.
May 24 16:57:49 frontsignparts sendemail[22976]: Email was sent successfully!

```

Kann’s irgendwie möglich sein, dass Shopware trotz der Zeile in /etc/gai.conf durch IPv6 Emails versendet?
