Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

E-Mail-Versand in WordPress mit dem Gmail SMTP-Server

Hinweis der Redaktion: Wir erhalten eine Provision für Partnerlinks auf WPBeginner. Die Provisionen haben keinen Einfluss auf die Meinung oder Bewertung unserer Redakteure. Erfahre mehr über Redaktioneller Prozess.

Haben Sie Probleme beim Versenden von E-Mails über Ihre WordPress-Website?

Standardmäßig verwendet WordPress zum Versenden von E-Mails die PHP-Mail-Funktion, die von einigen Servern eingeschränkt wird. Eine einfache Möglichkeit, dieses Problem zu lösen, besteht darin, WordPress-E-Mails über den SMTP-Server von Gmail zu versenden.

In diesem Artikel zeigen wir Ihnen, wie Sie von Ihrer WordPress-Website aus E-Mails über den Gmail-SMTP-Server versenden können.

How to use Gmail SMTP in WordPress

Warum und wann Sie Gmail SMTP-Server für WordPress-E-Mails benötigen

Ihre WordPress-Website sendet E-Mails, um Sie über neue Benutzerregistrierungen, das Zurücksetzen eines verlorenen Passworts, automatische Updates und Benachrichtigungen über Ihre Kontaktformulare zu informieren.

Standardmäßig verwendet WordPress die PHP-Mail-Funktion zum Versenden von E-Mail-Benachrichtigungen. Diese Funktion funktioniert jedoch aus einer Reihe von Gründen nicht wie erwartet.

Die meisten WordPress-Hosting-Unternehmen schränken die Nutzung dieser Funktion ein, um Missbrauch und Spam zu verhindern.

Die Spam-Filter gängiger E-Mail-Anbieter überprüfen eingehende E-Mails, um festzustellen, ob sie von authentischen E-Mail-Servern stammen. Standard-WordPress-E-Mails durchlaufen diese Prüfung nicht und schaffen es manchmal nicht einmal in den Spam-Ordner.

SMTP (Simple Mail Transfer Protocol) ist der Industriestandard für den Versand von E-Mails. Im Gegensatz zur PHP-Mailfunktion verwendet SMTP eine ordnungsgemäße Authentifizierung, die die Zustellbarkeit von E-Mails erhöht.

Gmail bietet einen SMTP-Dienst, den Sie zum Versenden von E-Mails von Ihrer WordPress-Website aus nutzen können. Wenn Sie nur WordPress-Benachrichtigungs-E-Mails an sich selbst und an einige wenige Benutzer auf Ihrer Website senden möchten, dann sind die SMTP-Server von Gmail die beste Option.

Wenn Sie jedoch planen, mit WordPress Newsletter-E-Mails zu versenden, oder wenn Sie einen Online-Shop haben, dann sollten Sie einen Massen-E-Mail-Dienstleister wie Brevo (früher Sendinblue) oder Mailgun verwenden.

Kostenloser vs. kostenpflichtiger Gmail SMTP-Dienst für WordPress

Sie können Ihr kostenloses Google Mail-Konto verwenden, um WordPress-E-Mails zu versenden. Für eine bessere Zustellbarkeit empfehlen wir jedoch die Verwendung des kostenpflichtigen Google Workspace.

Mit Google Workspace erhalten Sie Ihre eigene professionelle E-Mail-Adresse, z. B. (name@yoursite.com).

Google Workspace erfordert, dass Sie MX-Einträge zu Ihrem Domainnamen hinzufügen, was bedeutet, dass Ihre E-Mails scheinbar von Ihrem eigenen Domainnamen stammen, was die Authentizität erhöht und eine bessere Zustellbarkeit gewährleistet.

Wir verwenden Google Workspace für WPBeginner und können ehrlich sagen, dass es das Beste ist.

Video-Anleitung

Subscribe to WPBeginner

Wenn Sie eine schriftliche Anleitung bevorzugen, lesen Sie einfach weiter.

Senden von WordPress-E-Mails mit Gmail SMTP-Server

Wenn Sie sich für Google Workspace entscheiden, müssen Sie zunächst Ihre Domain für die Arbeit mit Google Apps einrichten. Wir haben eine Schritt-für-Schritt-Anleitung, wie Sie eine professionelle E-Mail-Adresse mit Google Workspace einrichten.

Der Rest der Anweisungen ist gleich, egal ob Sie ein kostenpflichtiges oder ein kostenloses Google Mail-Konto verwenden.

Als Erstes müssen Sie das WP Mail SMTP-Plugin installieren und aktivieren. Weitere Einzelheiten finden Sie in unserer Schritt-für-Schritt-Anleitung für die Installation eines WordPress-Plugins.

WP Mail SMTP ist das beste WordPress-SMTP-Plugin auf dem Markt. Es ermöglicht Ihnen die einfache Nutzung eines beliebigen SMTP-Servers, um WordPress-E-Mails mit höherer Zustellbarkeit zu versenden.

Es gibt zwar eine kostenlose Version, aber wir empfehlen den Kauf der kostenpflichtigen Version WP Mail SMTP Pro, mit der Sie Zugang zu Premium-Support, mehr Mailern und einer White-Glove-Einrichtung durch einen ihrer Experten erhalten.

Nach der Aktivierung müssen Sie die Seite Einstellungen “ WP Mail SMTP aufrufen, um die Einstellungen des Plugins zu konfigurieren. Geben Sie dann Ihren Lizenzschlüssel ein und klicken Sie auf die Schaltfläche „Schlüssel überprüfen“. Sie finden den Schlüssel in Ihrem WP Mail SMTP-Kontobereich.

WP Mail SMTP settings

Auf der Registerkarte „Allgemeine Einstellungen“ müssen Sie sicherstellen, dass Sie Ihre Google Mail-E-Mail-Adresse im Feld „Von E-Mail“ verwenden.

Als nächstes müssen Sie den Namen des Absenders angeben.

Enter from email and name

Das WP Mail SMTP-Plugin bietet zwei Möglichkeiten, Ihre WordPress-Website mit den Gmail-Servern zu verbinden.

Die erste Methode verwendet die OAuth-Authentifizierung. Dies ist eine sicherere Methode zum Senden von E-Mails über Google Mail-Server.

Die zweite Methode besteht darin, die SMTP-Einstellungen von Google Mail manuell einzugeben. Diese Methode wird nicht empfohlen, da sie weniger sicher ist.

Richten wir also WordPress so ein, dass es Gmail SMTP zum Senden von E-Mails verwendet.

Methode 1: Einrichten von Gmail zum Senden von WordPress-E-Mails mit dem OAuth-Protokoll

Diese Methode wird für alle Benutzer empfohlen. Sie ist sicherer, und wenn Sie sie einmal eingerichtet haben, müssen Sie das nie wieder tun.

Zunächst müssen Sie „Google/ Gmail“ als Mailer auswählen.

Choose Google as mailer

Wenn Sie nun nach unten scrollen, sehen Sie drei Felder, die Sie ausfüllen müssen.

Geben Sie dort einfach Ihre Client-ID, Ihr Client-Geheimnis und die autorisierte Umleitungs-URI ein.

Client ID and secret fields

Lassen Sie uns diese Felder einrichten.

Erstellen einer App und Generieren von API-Schlüsseln für Google Mail

Besuchen Sie dazu einfach die Website von Google Cloud Platform.

Klicken Sie dann oben auf „Mein erstes Projekt“.

Click my first project

Es öffnet sich ein kleines Popup-Fenster, in dem Sie Ihre Projekte auswählen können.

Klicken Sie nun auf die Option „Neues Projekt“.

Create a new project

Auf dem nächsten Bildschirm werden Sie aufgefordert, einen Namen für Ihr Projekt anzugeben.

Geben Sie ihm einen einprägsamen Namen, damit Sie es in Zukunft leicht wiedererkennen können.

Enter project details

Klicken Sie anschließend auf die Schaltfläche „Erstellen“, um fortzufahren.

Die Entwicklerkonsole wird nun Ihr Projekt erstellen und Sie zu seinem Dashboard führen. Google bietet Entwicklern Zugang zu vielen seiner APIs und Dienste. Sie müssen die APIs aktivieren, die Sie für dieses Projekt benötigen.

Enable APIs and services

Klicken Sie auf die Schaltfläche „APIs und Dienste aktivieren“, um fortzufahren.

Dadurch gelangen Sie auf die Seite der API-Bibliothek. Geben Sie als Nächstes Gmail in das Suchfeld ein, um die Gmail-API schnell zu finden, und klicken Sie darauf, um sie auszuwählen.

Select Gmail API

Sie erhalten nun einen Überblick über die API und ihre Funktionen.

Klicken Sie einfach auf die Schaltfläche „Aktivieren“, um fortzufahren.

Enable Gmail API

Da Ihre API nun aktiviert ist, müssen Sie im nächsten Schritt Anmeldeinformationen erstellen, die Sie in den Einstellungen Ihres WP Mail SMTP-Plugins verwenden können.

Klicken Sie auf die Schaltfläche „+ Anmeldeinformationen erstellen“, um fortzufahren, und wählen Sie im Dropdown-Menü die Option „Hilfe bei der Auswahl“.

Click create credentials

Auf dem nächsten Bildschirm werden Sie gefragt, welche API Sie verwenden möchten.

Wählen Sie „Google Mail API“ aus dem Dropdown-Menü für die von Ihnen verwendete API.

Choose Gmail API

Wählen Sie anschließend „Benutzerdaten“ für die Daten, auf die Sie zugreifen möchten.

Klicken Sie dann auf die Schaltfläche „Weiter“.

Select user data

Nun müssen Sie die Informationen zu Ihrer App eingeben.

Sie können zunächst einen Namen für Ihre App angeben, die von Ihnen angegebene E-Mail-Adresse auswählen und gegebenenfalls ein App-Logo hinzufügen.

Enter app information

Von dort aus müssen Sie einen Bildlauf nach unten durchführen und die Kontaktinformationen des Entwicklers eingeben.

Sobald Sie die E-Mail-Adresse eingegeben haben, klicken Sie einfach auf die Schaltfläche „Speichern und weiter“.

Enter developer contact information

Auf dem nächsten Bildschirm können Sie die „Bereiche“ für die Google Mail-API konfigurieren. Dies ist ein optionaler Schritt, den Sie vorerst überspringen können.

Blättern Sie einfach bis zum Ende der Seite und klicken Sie auf die Schaltfläche „Speichern und weiter“.

Skip scopes

Geben Sie als Nächstes die Details für die OAuth-Client-ID ein.

Wählen Sie zunächst „Webanwendung“ als Anwendungstyp aus dem Dropdown-Menü und geben Sie dann einen Namen ein.

Select application type

Wenn Sie nach unten blättern, sehen Sie Optionen für autorisierte JavaScript-Ursprünge. Sie können dies überspringen und zu den autorisierten Umleitungs-URLs übergehen.

Klicken Sie auf die Schaltfläche „+ URL hinzufügen“ unter „Autorisierte Weiterleitungs-URLs“ und geben Sie https://connect.wpmailsmtp.com/google/ in das Feld „URLs“ ein.

Add redirect URLs

Sobald Sie die URL eingegeben haben, klicken Sie einfach auf die Schaltfläche „Erstellen“.

Als Nächstes sehen Sie Ihre Anmeldedaten unter dem Bereich Ihre Anmeldedaten.

Download your credentials

Klicken Sie unten auf die Schaltfläche „Fertig“, um fortzufahren.

Sie werden nun auf die Seite mit den Anmeldeinformationen für Ihr Projekt weitergeleitet. Auf dieser Seite sehen Sie Ihre kürzlich erstellten Anmeldeinformationen aufgelistet. Um fortzufahren, müssen Sie auf das Symbol „Bearbeiten“ neben Ihren Anmeldedaten klicken.

Edit credentials

Dadurch gelangen Sie auf die Seite Anmeldeinformationen bearbeiten, wo Sie Ihr Kundengeheimnis und Ihre Kunden-ID sehen können.

Kopieren Sie den Schlüssel und fügen Sie ihn auf der Einstellungsseite Ihres Plugins ein.

Copy client ID and secret

Kehren Sie zurück zur Einstellungsseite des Plugins in Ihrem WordPress-Adminbereich.

Da Sie nun sowohl die Client-ID als auch die geheimen Client-Schlüssel haben, müssen Sie auf die Schaltfläche „Einstellungen speichern“ klicken, um fortzufahren.

Enter client ID and secret in plugin

Das Plugin speichert nun Ihre Einstellungen und lädt die Seite neu.

Danach müssen Sie bis zum Ende der Einstellungsseite scrollen und auf die Schaltfläche „Erlauben Sie dem Plugin, E-Mails über Ihr Google-Konto zu senden“ klicken.

Allow plugin

So gelangen Sie zu Ihrem Konto bei Google.

Anschließend werden Sie aufgefordert, der Website die Erlaubnis zu erteilen, in Ihrem Namen E-Mails zu versenden.

Choose Google account

Wählen Sie einfach Ihr Google Mail-Konto aus und erteilen Sie die Erlaubnis, Ihr Google API-Projekt zu verknüpfen.

Danach werden Sie zu Ihrer Website zurückgeleitet, wo Sie eine Erfolgsmeldung sehen.

Connected successfully

Methode 2: Einrichten von Gmail SMTP als SMTP-Sender

Mit dieser Methode können Sie sich manuell mit den SMTP-Servern von Google Mail verbinden, um Ihre WordPress-E-Mails zu versenden.

Zunächst müssen Sie die Seite Einstellungen “ WP Mail SMTP aufrufen, um die Plugin-Einstellungen zu konfigurieren.

Geben Sie zunächst die gewünschte Google Mail-Adresse in das Feld „Von E-Mail“ und Ihren Namen in das Feld „Von Name“ ein.

Enter from email and name

Als Nächstes müssen Sie „Anderes SMTP“ als Ihren Mailer auswählen.

Aktivieren Sie auch das Kästchen neben dem Rückweg.

Choose Other SMTP as mailer

Blättern Sie dann nach unten zum Abschnitt Other SMTP.

Hier konfigurieren wir weitere Einstellungen für die Verbindung mit den SMTP-Servern von Google Mail.

Configure other SMTP

Hier ist die genaue Konfiguration, die Sie zu den Plugin-Einstellungen hinzufügen müssen:

  • SMTP-Host: smtp.gmail.com
  • Verschlüsselung: Verwenden Sie SSL-Verschlüsselung
  • SMTP-Port: 465 (sollte automatisch erscheinen, wenn Sie SSL-Verschlüsselung wählen)
  • Auto TLS: TLS ausschalten
  • Authentifizierung: Aktivieren Sie die Authentifizierung
  • SMTP-Benutzername: Ihre vollständige Gmail-Adresse, z. B. john.smith@yourdomain.com oder john.smith@gmail.com
  • SMTP-Passwort: Passwort für Ihr Gmail-Konto

Wenn Sie fertig sind, klicken Sie auf die Schaltfläche Änderungen speichern, um Ihre Einstellungen zu speichern.

Save settings for other SMTP

Das ist alles; Sie haben WP Mail SMTP erfolgreich eingerichtet, um Gmail SMTP-Server zu verwenden.

Hinweis: Wenn Sie die zweite Methode verwenden, sollten Sie wissen, dass sie weniger sicher ist, da Ihr Passwort in Textform gespeichert wird. Sie können dies durch den konstanten Tipp verbessern, aber wir empfehlen dringend, Methode 1 zu verwenden.

Testen Ihrer WP Mail SMTP-Einstellungen

Mit dem WP Mail SMTP-Plugin können Sie Ihre E-Mail-Einstellungen testen, um sicherzustellen, dass alles richtig funktioniert.

Besuchen Sie die Seite Einstellungen “ WP Mail SMTP und klicken Sie auf die Registerkarte „E-Mail-Test“. Geben Sie einfach eine E-Mail-Adresse in das Feld „Senden an“ ein, auf die Sie zugreifen können, und klicken Sie auf die Schaltfläche „E-Mail senden“.

Send test email

Sie werden eine Erfolgsmeldung sehen. Sie können nun Ihren Posteingang überprüfen und eine Nachricht mit der Betreffzeile „WP Mail SMTP: Test Email to…“ sehen.

Das war’s. Sie haben Ihre WordPress-Website erfolgreich für den Versand von E-Mails über Gmail SMTP-Server eingerichtet.

Mehr erreichen mit WP Mail SMTP Pro

Wenn Sie noch mehr Funktionalität wünschen, sollten Sie WP Mail SMTP Pro ausprobieren.

Mit der Pro-Version des Plugins können Sie eine Verbindung herstellen:

  • Google Arbeitsbereich/Gmail
  • Amazon SES
  • Mailgun
  • Büro 365 / Outlook.com
  • SendGrid
  • Und mehr

Außerdem erhalten Sie zusätzliche Funktionen wie E-Mail-Protokolle, die Möglichkeit zur Feinabstimmung/Steuerung, welche Benachrichtigungen Ihre WordPress-Website sendet, und vieles mehr.

Fehlerbehebung bei nicht funktionierendem Gmail SMTP-Problem

Wir haben gesehen, dass Benutzer bei der Verwendung von Gmail SMTP mit bestimmten Shared-Hosting-Konfigurationen auf einige Probleme gestoßen sind.

Führen Sie die folgenden Schritte aus, um das Gmail-SMTP-Problem zu beheben:

Melden Sie sich bei Ihrem cPanel-Konto an. Suchen Sie dann auf der Seite mit den E-Mail-Konten die Schaltfläche „+ Erstellen“.

create email account in cpanel

Von dort aus können Sie ein E-Mail-Konto erstellen, das mit Ihrer Google Apps-E-Mail-Adresse übereinstimmt.

Durch die Einrichtung des E-Mail-Kontos machen Sie Ihren Hosting-Server auf eine E-Mail-Adresse aufmerksam, über die E-Mails versendet werden sollen. Dieser Schritt ist ein Workaround, um den Server davon zu überzeugen, dass Sie E-Mails über ihn versenden, auch wenn Sie den SMTP-Server von Google Mail verwenden möchten.

create an email account

Dies mag seltsam erscheinen, da Sie Ihren Server nicht für E-Mails verwenden. Dieser Schritt gaukelt Ihrem Server im Grunde vor, dass Sie die E-Mail über den Server senden.

Gehen Sie in Ihrem cPanel-Konto zu den MX-Einträgen und ändern Sie das MX-Routing von automatisch auf remote. Es könnte etwas schwierig sein, dies zu finden, da jeder Host jetzt eine eigene cPanel-Schnittstelle hat.

Sie müssen nach einem kleinen Link neben MX suchen, auf dem E-Mail-Routing steht: Remote Mail Exchanger. Sie können unserer Anleitung folgen, wie Sie die MX-Einträge für Ihre WordPress-Website je nach Ihrem Hosting-Service ändern.

Melden Sie sich danach wieder bei Ihrer WordPress-Website an und senden Sie eine Test-E-Mail.

Wir hoffen, dass dieser Artikel Ihnen geholfen hat, zu lernen, wie man E-Mails in WordPress mit dem Gmail SMTP-Server versendet. Vielleicht interessieren Sie sich auch für unsere Liste der besten Kontaktformular-Plugins für WordPress und unseren Vergleich der besten E-Mail-Marketingdienste für kleine Unternehmen.

Wenn Ihnen dieser Artikel gefallen hat, dann abonnieren Sie bitte unseren YouTube-Kanal für WordPress-Videotutorials. Sie können uns auch auf Twitter und Facebook finden.

Offenlegung: Unsere Inhalte werden von unseren Lesern unterstützt. Das bedeutet, dass wir möglicherweise eine Provision verdienen, wenn Sie auf einige unserer Links klicken. Mehr dazu erfahren Sie unter Wie WPBeginner finanziert wird , warum das wichtig ist und wie Sie uns unterstützen können. Hier finden Sie unseren redaktionellen Prozess .

Das ultimative WordPress Toolkit

Erhalte KOSTENLOSEN Zugang zu unserem Toolkit - eine Sammlung von WordPress-bezogenen Produkten und Ressourcen, die jeder Profi haben sollte!

Reader Interactions

134 KommentareEine Antwort hinterlassen

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. David says

    Hi, I used this tutorial last year to install and configure the Gmail SMTP plugin. Until very recently, the Gmail SMTP plugin in conjunction with my website’s contact form worked perfectly. But I tested my website’s contact form today, and I got the following fatal-error message:

    Fatal error: Uncaught exception ‚Google_Auth_Exception‘ with message ‚Error refreshing the OAuth2 token, message: ‚{ „error“ : „invalid_grant“ }“

    I don’t have a clue what that means. I get the same fatal-error message when I use the plugin to send a test message at Gmail SMTP plugin>Settings>Test email.

    I haven’t changed any of the plugin settings since I first installed it a year ago, and I haven’t done anything new with my Google Console account either. I’m using the most recent version of the Gmail SMTP plugin, and also the newest version of WordPress.

    Any ideas or suggestions?

    Thanks!

  3. Ehsan says

    Thank U very much – one of my problem was this „my emails goes to spam folder“
    with this service(Method 1) Now It’s great – of course after 14 days you must pay for that but still it’s prefect
    I have question;
    Can I send 100 Emails like newsletter for my customer is it OK for Google!?
    I afraid my Emails after it goes to spam folder again

  4. Adondriel says

    Hey, add a thing at the end for the troubleshooting thing: „Check with your website host and verify that they do not block outgoing requests by default.“ I know 1. GoDaddy does this, and won’t let you unblock. and 2. Namecheap also blocks by default but you just gotta contact support, give em your info and ask em to unblock port 587 and boom, it’ll all work again.

  5. adam says

    i keep getting a Error: redirect_uri_mismatch when i press ‚grant permission‘. It’s driving me nuts as I can’t work out what is wrong? Everything seems to match.
    Adam

  6. Macky says

    This video has been a fantastic help.

    I’m a complete WordPress beginner.The step-by step instructions are very easy to follow. Now my emails are working perfectly!! Plus I also learnt how to insert headers & footers with ease.

    Thanks once again!!

  7. Maggie Z says

    A follow-up question – because of the login conflict issue, I was also considering using WP Mail SMTP. However, many users on the support forum for that plugin express concern that the password for the email account is visible on the admin page in plain text.

    I have a firewall set up that prevents non-admins from getting in to the back end, so is there any real security concern regarding the password showing in plain text? Any advice much appreciated!!!

    • Maggie Z says

      After troubleshooting quite a bit, I finally relented and went with WP Mail SMTP, which requires the „allow less secure apps“ solution – a tech support person at G Suite told me that it was safe, and it seems like the only way to go for my particular setup. Appears to be working now. Thanks for the incredibly clear instructions!!! I am now a firm fan of this site.

  8. Maggie Zellner says

    The video is fantastic, and the plugin installed perfectly. Unfortunately I didn’t realize until after I went through the whole process (because I didn’t read the documentation on the plugin carefully), the Gmail SMTP plugin eliminates the need for users to log in, and therefore it interfered with the login process that we have instituted for paid members on our website (which we manage through a plugin called PaidMembershipsPro).

    Is there any way to disable that aspect of this plugin, so I can send all email via our Gmail account, but can still have users log in and out?

  9. Eric says

    Great article! However, I am unclear on something when using WordPress for sending newsletters. What is the difference between those mass emailing service providers (mailgun & Sendgrid) and using Google Apps for work SMTP?

    Can’t we use Google Apps for work to send newsletters just as well?

    • Eric says

      Thanks so much for your response! With Google Apps for Work only limiting to 500 recipients, then I suppose it would work if we sent it to 500 or less people.

      My next question, is it max to send all at one time or per day? If we throttle it to only send out a few per minute, do you know if it would allow it to send thousands within a few hours?

  10. zim ejin says

    Hi, this was very informative thank you for posting. however i have a website hosted on aws ec2, and route53 for dns. i tried the secure configuration. it didn’t work. Is there a special configuration for self hosted websites on aws ec2/route53. btw : i don’t have a cpanel installed.

  11. Lanrz says

    After granting access and clicking on the allow button, I was not being redirected back to wordpress and the SMTP status is still not connected.

    Any advice on how I should go about doing it?

    Thanks!

  12. Nathalie says

    Doesn’t work: test email retuens Connection: opening to smtp.gmail.com:587, timeout=300, options=array ( ’ssl‘ => array ( ‚verify_peer‘ => false, ‚verify_peer_name‘ => false, ‚allow_self_signed‘ => true, ),)
    I checked Email Routing -> Remote Mail Exchanger but it didn’t help

  13. Real Name says

    This guide worked wonderfully until my server stopped sending emails and I can’t get it to work again. The „Test Email“ tab doesn’t make it clear if the email has successfully sent or not since it just spews out 52 lines that don’t mean much to me. :/

  14. peter says

    Ok, so I have followed the OAuth instructions and my SMPT status button has gone green. However, whether through test email or my site, I can not send an email through the contact us form (pluggin contact form builder by web Durado). The hanging message say waiting for and eventually I get a 405 error notice.

    Any thoughts.

  15. Thomas says

    Hoping you can help me?

    I tried setting up method 1 using gmail and I got the ‚green light‘ from wordpress however when testing the email I receive the following error message after waiting 1 minute for it to send:

    Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()

    Any ideas on how to fix this?

    Very best,

    Tom

  16. Fernando Santos says

    This tutorial is awesome!

    I have one question, though. I directed the contact form messages to a gmail group email address, but, for some reason, the messages aren’t being delivered. When I direct to a „real“ e-mail address like the messages are normally delivered.

    I would really appreciate if someone could give me a hand figuring out why this happens.

    Thank you!!!

  17. Andres says

    Thanks guys for such useful article. I followed all the steps and was able to configure the email correctly. However, when I receive the email from mydomain.com address (sent by wordpress after purchasing a product), the user avatar (gmail picture) doesn’t appear even though mydomain.com has a picture already.

    In fact, if I send an email directly from mydomain.com account via google for work, the receiver is able to see the image right away, but it’s not the case if the email is sent via wordpress.

    Do you have any suggestions? Thanks a lot, and keep rocking!

  18. Sahar says

    Thanks for this helpful information. You really helped me out in setting this up, and I appreciate you taking the time to create this useful information!

  19. Susan says

    Excellent instructions and thanks for walking me through setting this up. I did try the MX record change but no luck there either.
    I get a 405 Not allowed message when I try to send an email.
    I am hosted by Bluehost and am using the DIVI theme.
    If anyone has any ideas I would be very grateful.

    • Leista says

      Hello, having a similar issue. Getting a 405 error, and also hosted on Bluehost. By any chance, were you able to fix the problem? Thanks.

      • JDC says

        I had the same problem with bluehost. But this gave me the solution.

        I uninstalled any extra plugin for mail, including smtp mailer or gmail smtp plugin and just used a random address like mynewaddress@example.com (replace example.com with your own domain name) and it worked. I sent an email to my gmail account I it passes all the filters. It seems that BlueHost validates the address if it is comming from the server that hosts that domain. In gmail you usually get a warning that says that this email might not have being validated, but my email are comming fine with custom wordpress email functions. No extra plugin needed.

  20. Louise says

    I have this working brilliantly with a Google apps for work account for a woocommerce solution on wordpress, thank you.

    Should this work if I use a Google group mail instead of an account?

    Thanks very much.

  21. Brian Treiber says

    I am not using Google apps for work, I have everything set up and connected. I tried to send a test email however I get a 405 not allowed error. I went into my cpanel and changed the mx records to the recommended“ remote.“ Still can’t send. Does this mean I need to use the less secure method?

  22. Jason North says

    I’m getting this error when I try to activate the plugin:

    Plugin could not be activated because it triggered a fatal error. Parse error: syntax error, unexpected T_FUNCTION, expecting ‚)‘ in /home3/north23/public_html/forcebrain/wp-content/plugins/gmail-smtp/google-api-php-client/src/Google/autoload.php on line 19

  23. genie says

    Hello, I use gmail-smtp plugin but it conflict with ultimate membership. Could you help me ?
    I try another wp mail smtp but in the last feld: user account pass. Google app not allow to login from plugin. Pls help
    Thank you

  24. Leslie Andrews says

    Clearly I’m doing something wrong. When I get to „add credentials“ I’m getting this error message and can’t move forward.

    Invalid Redirect: must end with a public top-level domain (such as .com or .org)

    Any help would be great

  25. Graham says

    Thanks for the tutorial, but I get this error when I try to send a test email:

    Connection: opening to ssl://smtp.gmail.com:587, timeout=300, options=array ()
    SMTP ERROR: Failed to connect to server: Connection refused (111)
    SMTP connect() failed.

    Does it have something to with my site being secured with SSL?

  26. Tom says

    Nice Article, I’m having a few issues to get this working. So I Deactivated the Plugin and tested a Contact Form to see if all was the same before setting up Gmail SMTP, unfotunately No Emails are being sent through now.

    Even though the Gmail SMTP Plugin is NOT active, do we need to reset back to the default settings somehow?

  27. Jenny says

    Hi,

    I have this all set up properly and the test email worked…I just commented on my own blog to see if I would get an email when a comment was posted but I unfortunately didn’t. Can someone help me figure out where I went wrong?

  28. Sachin says

    Hey thanks for the tutorial. Everything works fine in Setup, but when mail is being sent the site freezes for about 5 mins. site doesnt open at that time. It doesnt respond at that time. Any idea what might be causing this issue. But the point is mail is sent at last finally

  29. crissy says

    Hi,

    I’m having problem with the test email send

    Fatal error: Cannot redeclare class phpmailer in /home/mywebsite/wp-includes/class-phpmailer.php on line 29

    please help

  30. David says

    Hi, I just installed this plugin, and everything went perfectly–thanks to your excellent tutorial! (I definitely couldn’t have done it without you.) My website’s outgoing email immediately started landing in people’s inboxes rather than in their spam folders.

    But since I’m a novice at these matters and don’t know SMTP from RSVP, I did some reading on SMTP, and on one website I came across made this statement:

    „Another strategy that hackers use: If your app sends email using SMTP, the IP address will be recorded in the Received header lines. Either scrub the original Received line [no explanation provided of how that’s done], or don’t use SMTP for email submission.“

    Is this something I should be concerned about security-wise? Or does this plugin solve this problem somehow? And if not, how should I fix it?

    Thanks!

    • WPBeginner Support says

      You shouldn’t be concerned about it. Most popular email service providers and their spam filters can check if an email is originating from the IP address it claims to be coming from.

      Admin

  31. Travis says

    Thanks so much for this tutorial.

    Originally I had this all setup and working fine, but I moved my website and did some other fixes to it, and suddenly mailing stopped working.

    Previously I spent some time trying to set it up and get it to work, but then it „stopped“ working randomly.

    Anyways, option #1 really saved me a major headache.

  32. Christine Tabor says

    I configured, and got the green go to go button… THANKS FOR THE STEP BY STEP…
    (doing this on a client test site)…

    BUT REGARDING GRAVITY FORMS (or any form plug in)… do I also need to change up the notification emails that I’ve used for the Gravity Forms submissions?

    Is it ok for the „from“ email I used in the configuration to be different than the gmail used to set i up?

    The issue that started all this was client not getting his Gravity Form notifications.

    SO, before I install on their live site… (which is ecommerce and SSL)… can you reply to this … and should I still use the TSL for the configuration? I wasn’t sure if a certificate on the site made any difference in configuring this.

    Thanks,
    Christine

    • WPBeginner Support says

      No you don’t need to change notification emails.

      It is OK, but to ensure maximum deliverability you should use the email address that is actually sending the email.

      You should try with SSL first for the Gmail Configuration.

      Admin

      • Christine says

        Thanks for reply…little bit more clarification please.

        I set up an email…info@domain.com as a forwarder in cpanel, and I forward to their Verizon email.

        I left the Verizon email in the GF notification list, added the info email, and another alternate email.

        So the info email is the one in Gmail plugin set up that is sending the email…is it ok that it’s a forwarder?

        Also, when I set up the plugin, I used a gmail I had created … CompanyName@gmail.com
        But not using it as the sending email or anywhere else.

        I sent a test and it appears all worked… Should I go back and change to SSL instead of the TSL or leave as is?

        Thanks again…
        Christine

  33. Tim R says

    Doesn’t work for me on April 14, 2016.

    Things I do rarely work.

    Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
    SMTP ERROR: Failed to connect to server: Network is unreachable (101)
    SMTP connect() failed.
    Mailer Error: SMTP connect() failed.
    Any point in fussing with this ?

    • Tim R says

      Here’s a follow up:

      Settings of my web host’s server made this impossible.

      Switched hosts and now it works easy as pie.

      Don’t forget to change settings on gmail account to allow for unregistered apps (a search will discover many instructions to do that so I won’t add it here)

      • Monica says

        Hey i tried allowing access for unregistered apps it still doesnt work for me.
        I am getting the error:
        Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
        SMTP ERROR: Failed to connect to server: Connection refused (111)
        SMTP connect() failed.
        Any ideas ?

  34. Bclose says

    Hi ,
    Thanks for this ticket ..i was fighting with my emial provider weblayer and nothing. it worked with your magic touch , one simple note .. by the end of Ouauth when explaining to create a fake local email you forgot to include that we must use MX record and what is is , i search on google and found ALT2.ASPMX.L.GOOGLE.COM, but this last simply thing could be a danwfault for all readers :-)
    Either way thank you..a lot!

  35. Tyler says

    Anyone get this working with google apps email? I’ve created API credentials. SMTP status is green. But Test email says connection refused. Already set mx to remote on godaddy. Are there any security setting ls in google apps email that have to be configured?

  36. TJ says

    Nice article, was able to install the plugin and it sent the email from the plugin test email.

    Fails when using Contact Form 7, any recommendations for a contact form plugin that this might work with?

    Thanks

Eine Antwort hinterlassen

Danke, dass du einen Kommentar hinterlassen möchtest. Bitte beachte, dass alle Kommentare nach unseren kommentarpolitik moderiert werden und deine E-Mail-Adresse NICHT veröffentlicht wird. Bitte verwende KEINE Schlüsselwörter im Namensfeld. Lass uns ein persönliches und sinnvolles Gespräch führen.