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. Jiří Vaněk says

    Amazing guide. Thanks. Setting up Gmail SMTP always gives me a headache because it takes so long. It’s incomparable to the traditional SMTP setup for a private domain email, where you enter the SMTP server, login, password, and port, and it’s done. Thanks a lot.

  3. Mallory Moore says

    After completing all the steps it re-directed me to my WordPress site but it went to a page that said not found to there was no success msg so I can’t test as it still says unauthorized.

  4. Vaskar says

    I want to send newsletters/mail to my website subscribers. I want to send mail to my website subscribers from my gsuite business mail address. Can you suggest to me that what I have to do now?

  5. Peter says

    Hi

    When setting up Oauth consent screen, Internal and External options are present. Only external option is available to Gmail users. Is this the correct one to choose?

    Thanks!

    • WPBeginner Support says

      It sounds like that would be correct, for questions about the plugin we would recommend reaching out to the plugin’s support for assistance

      Admin

  6. Gordon Barker says

    No where can I find where to set the email „to field“ please could you explain how to set this field?

  7. Vivek says

    Hi,

    My emails are automatically deleting, i’ve not set any filters or any other things. What might be the issue?

    • WPBeginner Support says

      You would want to reach out to who you are using for your emails to ensure there isn’t an issue on thier end.

      Admin

  8. Dusan says

    With this I get the 2000 limit in a 24 hour period as it uses only 1 email address. Is there a way to use this as the smtp relay that allows 10,000 emails to send per 24 hour period. Or any way to add in multiple emails to send from?

  9. Dan Martin says

    I just used this for my site and it worked. Seriously this was a life saver. I had spent several hours troubleshooting and the video solved the whole problem in like 5 minutes. Thanks.

  10. Luigi says

    How can I send emails configured with WP MAIL SMTP (I use gmail) customized with the site’s domain? I need to differentiate emails depending on the type of email my site sends.

    • WPBeginner Support says

      It would depend on what plugin/tools you are using to send the emails as WP Mail SMTP is for changing how WordPress sends the emails not for users sending emails.

      Admin

  11. Austin Blair says

    Just wanted to say THANK YOU! I was totally struggling to get my contact form to send emails correctly until I came across your post. I used the first method and it worked like a charm. However there was a step (probably recently introduced) where I had to set up a consent form? Took me to a different screen not featured in the video, but was relatively straight forward. Thanks again!

  12. Bobby Zopfan says

    First method (configuring inside GCloud) seemed too long to me.
    So adapted the 2nd method (don’t agree with you that 2nd method is more difficult). 2nd method has just 3-4 steps.

    But it didn’t work. SMTP couldn’t authenticate me. Although my ID/pW is fully correct.

    • WPBeginner Support says

      If you reach out to the plugin’s support with your specifics they should be able to help you find the problem :)

      Admin

  13. Daniel says

    Thanks again for the awesome tutorial, the forms work fine now! I have a question: I’d like to change the From Name in the plugin settings, but it’s impossible. I’ve tried to reintstall the plugin, all my settings were still saved tho. Is there any way I could change the From Name of the email now?

    • WPBeginner Support says

      You would want to reach out to the plugin’s support for how to set that up but for the moment, if you set it to the default method it should allow you to change those settings.

      Admin

  14. Afam says

    Hello there,

    I’m really tired with this issue of CF7 not able to send mails to gmail from my site. It seems everyone has this issue.

    I followed your instructions to the letter and got to the point I’m supposed to allow plugin to send emails using my google account, an error appears telling me of a URI mismatch. What’s that? I copied and pasted the uri as you said. What did I do wrong. Please help me, have not been sleeping because of this.

    Thanks.

    • WPBeginner Support says

      Hi Afam,

      You may not have saved the redirect URI when creating the app, follow the steps again and make sure that you copy the exact URL from plugin’s settings page to enter in your app.

      Admin

  15. Sarah says

    Hello,

    I have followed the instructions you provided, than you! I got all the way to the „allow plugin to send emails….“ for gmail and when i click on that button it gives me the message that the app hasn’t been verified.
    I have tried multiple fixes but it is still isn’t working.

    I am using bluehost and WP mail stmp.

    Any suggestions?
    Thank you

  16. Raphael says

    Don’t work for me. I’m using Google Cloud and Cloudflare and when i try to send a test email give me a error:

    „Could not authenticate your SMTP account.“

  17. Mohd Tariq Khan says

    My client use g suite for email, I have created WordPress page website with contact form 7 plugin. I have analyzed contact form was not sending email from website to Gmail.

    Therefore, I have used ‚WP Mail SMTP‘ plugin and create gmail API, Now email is working.

    But I am facing one issue, when submit contact us form email receive in gmail but all email recived from title is ‚me‘.

    Therefore, every time show like I have to send email to myself.

    I want in email ‚Sender name‘ appear at from.

    Please help me.

  18. jood says

    i think the key is create a same name account in bluehost within email , so as to trick host , the problem is the email will be taken as spam .

  19. raja says

    hi.. i have tried to send mail using wp-mail-smtp on wordpress BY gmail as per tutorial..

    when i try to OAUTH 2 in gmail on wordpress,, it shows error.
    —————————

    Not Acceptable!
    An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
    —————————–

    i have contacted hosting hostgator support.. Mod_security settings cant be whitelisted, as it may will leave the website vulnerable.

    please advise how to send mails

  20. Angela Andrieux says

    Thank you for the thorough instructions! This site has saved me so many times. I really appreciate the great content!

  21. Leonardo Assennato says

    Hello,
    I setup an email address to send the emails and it worked.
    But I need to change the email account.

    I already tried the Method 2, but it doesn’t work on my server.

    I already unnistalled and re-install the plugin but all the data are stored.

    Can anybody help me?

  22. Ahmad fatah says

    is this tutor works with free gmail account?
    thanks for great tutorial you make..
    i search anything about wp and your site in top of google..just wow

  23. Kevin says

    I just went through this and got the following message after trying to send a test email:

    Connection: opening to smtp.gmail.com:587, timeout=300, options=array ()
    Connection: Failed to connect to server. Error number 2. „Error notice: stream_socket_client(): unable to connect to smtp.gmail.com:587 (Network is unreachable)
    SMTP ERROR: Failed to connect to server: Network is unreachable (101)
    SMTP connect() failed.

  24. Pawan Negi says

    Hi please help me when i click on grant permission button it show me that error.

    400. That’s an error.

    Error: invalid_scope

    You don’t have permission to access some scopes. Your project is trying to access scopes that need to go through the verification process. {invalid = [https://mail.google.com/]} If you need to use one of these scopes, submit a verification request.

    Learn more

    Request Details
    client_id=940707600009-5f3lstctsc081s72c27h4hhmf5212a7p.apps.googleusercontent.com

    That’s all we know.

  25. Amanda says

    I got . . .

    Fatal error: Cannot redeclare class phpmailerException in /home/content/04/11965204/html/sofp/wp-includes/class-phpmailer.php on line 4040

    I can’t seem to get this fixed no matter what solve I try. There doesn’t appear to be a contact form in our future :-(

    Google Search didn’t help with this error code. I can’t imagine that I’m the first one to get it . . .

  26. Laura Hart says

    I loved how helpful this was, unfortunately I still can’t make the „grant access“ button appear! Any idea why that would happen? Googling isn’t working.
    Thank you!

  27. 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!

  28. 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

  29. 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.

  30. 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

  31. 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!!

  32. 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.

  33. 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?

  34. 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?

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.