SMTP de Gmail


El plugin Gmail SMTP te permite identificarte con tu cuenta Gmail para enviar correo electrónico a través del servidor SMTP de Gmail.

Most shared hosting servers have restrictions when it comes to email. Usually email will get blocked or missing for no reason. Sometimes it will get blocked when your website reaches the daily limit of outgoing email. This plugin can bypass this issue by routing the email through Gmail’s SMTP server.

Gmail SMTP Add-ons

Gmail SMTP Benefits

  • Gmail SMTP plugin is not like most SMTP plugins. It uses the OAuth 2.0 protocol to authorize access to the Gmail API – which means a more secure login system and users won’t have to enter any username or password.
  • Gmail SMTP plugin uses PHPMailer – a very popular library used for sending email through PHP’s mail function. This libary is also used in the core WordPress to send email.
  • Gmail SMTP plugin utilizes «wp_mail» (A function used by WordPress to send email) instead of completely overriding it. This way you still get all the benefits of the default mail function.
  • You no longer need to enable Allow less secure apps on your gmail account to fix SMTP connection issue. This issue became prominent from December 2014, when Google started imposing XOAUTH2 authentication (based on OAuth2) to access their apps. This issue still affects almost all the SMTP plugins because they authenticate via username and password.

How OAuth 2.0 Authorization Works

  • You register an application in the Google Developers Console.
  • The application is launched and it requests that you give it access to data in your Google account.
  • If you consent, the application receives credentials to access the Gmail API.

Gmail SMTP Features

  • Configure your website to send email using Gmail SMTP server
  • Authenticate using OAuth 2.0 protocol
  • Authenticate with encryption when sending an email (TLS/SSL)

Gmail SMTP Basic Setup

  • Create a new project in Google Developers Console.
  • Enable Gmail API in it.
  • Create credentials (OAuth client ID) to access this API.
  • Configure the consent screen for the web application.
  • Enter a Product Name and a Privacy policy URL.
  • Once the consent screen is configured, create a web application.
  • Go to the plugin settings (Settings->Gmail SMTP).
  • Set the Authorized Redirect URL of the application as the one shown in the settings.
  • Finish creating the web app.
  • Copy the newly created Client ID and Client secret and paste into the settings area.
  • Enter your OAuth Email, From Email and From name.
  • Select an encryption.
  • Enter a port number.
  • Save the settings.
  • Now you can authorize your application to access the Gmail API by clicking on the Grant Permission button.
  • Once the application has been authorized Gmail SMTP plugin will be able to take control of all outgoing email.

Gmail SMTP Settings

  • Authorized Redirect URI: Authorized redirect URL for your website. You need to copy this URL into your web application.
  • Client ID: The client ID of your web application.
  • Client secret: The client secret of your web application.
  • OAuth Email Address: The email address that you will use for SMTP authentication. This should be the same email used in the Google Developers Console.
  • From Email Address: The email address which will be used as the From Address when sending an email.
  • From Name: The name which will be used as the From Name when sending an email.
  • Type of Encryption: The encryption which will be used when sending an email (TLS/SSL. TLS is recommended).
  • SMTP Port: The port which will be used when sending an email. If you choose TLS it should be set to 587. For SSL use port 465 instead.
  • Desactivar la validación del certificado SSL: A partir de la versión 5.6 de PHP se mostrará un aviso/error si el certificado SSL del servidor no está correctamente configurado. Puedes marcar esta opción para desactivar ese comportamiento por defecto.

Gmail SMTP Test Email

Once you have configured the settings you can send a test email to check the functionality of the plugin.

  • To: Email address of the recipient.
  • Subject: Subject of the email.
  • Message: Email body.

Para instrucciones de instalación detalladas, por favor visita la página del plugin Gmail SMTP.



  1. Go to the Add New plugins screen in your WordPress Dashboard
  2. Haz clic en la pestaña de subir
  3. Busca en tu ordenador el archivo del plugin (
  4. Haz clic en «Instalar ahora» y luego pulsa el botón activar


¿Puedo enviar correo electrónico desde mi cuenta Gmail usando este plugin?


¿Puede este plugin usar OAuth 2.0 para enviar correo electrónico?


Can I use this plugin for Gmail signup?


Can I use this plugin on Gmail app?


Can I use this plugin to access my Gmail inbox?


Can I use this plugin to sign out of my Gmail account?



21 de abril de 2023
Rather use complex or multifunction mail provider plugin. If you want to use gsuite/gmail, just simple use this plugin. No ads and fare for add-on.
13 de abril de 2023
Only the necessary settings, simple and clean, good description. Thanks!
6 de marzo de 2022
Very simple and easy to use if you follow the directions properly, and the customer service is quick at resolving any issues!
22 de junio de 2021 2 respuestas
Why is there a separate field "From Email Address" when it is never used? No matter what is entered in the from field, instead the OAuth Email Address is always used. This means that all email sent from the company website will appear to the receiver of the mail as if I, just a webdeveloper, sent the email. I want the from email address to be different from the OAuth email address. Either the From address schould replace the OAuth email, or if that is not possible (as I am starting to suspect), remove that From field because it is not working and is very confusing because of it.
10 de mayo de 2021 1 respuesta
I struggled with the configuration of this plugin for a couple of hours trying to get it to handle authentication with gmail / g-suite. There was no way to get it to work. I have used this plugin in the past and wanted to make it work again, but it was just easier to switch to the Post SMTP plugin. That one works like a charm and has diagnostic data. I will eventually switch to Amazon SES and I beginning to think it will be easier to configure these settings manually in my server than to continue to use any of these plugins.
Leer todas las 98 reseñas

Colaboradores y desarrolladores

«SMTP de Gmail» es un software de código abierto. Las siguientes personas han colaborado con este plugin.


«SMTP de Gmail» está traducido en 8 idiomas. Gracias a los traductores por sus contribuciones.

Traduce «SMTP de Gmail» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

  • Compatibility update for WordPress 6.5.

  • Compatibility update for WordPress 6.4.

  • Additional check for the settings link.

  • Compatibility update for WordPress 6.3.

  • Proper sanitization of the test email body.

  • Removed slashes from test email subject and body.

  • Compatibility update for WordPress 6.2.

  • Added support for the Cc add-on.

  • Added support for the Reply-To add-on.

  • Compatibility update for WordPress 6.1.

  • Updated the mail function for WordPress 6.0.

  • Fixed an issue that could cause an Undefined variable error if $attachments was not set.


  • Updated the mail function for WordPress 5.9.


  • Updated for WordPress 5.8.
  • Updated the help text for the From Email Address field.


  • WordPress 5.7 compatibility update.


  • WordPress 5.5 compatibility update.


  • Gmail SMTP is compatible with WordPress 5.3.


  • Fixed this warning that is shown on servers running on PHP 7.2 or higher: PHP Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /wp-content/plugins/gmail-smtp/PHPMailer/PHPMailerAutoload.php on line 45


  • Se ha añadido algún código de manejo de errores después del paso de redirección autorizada. Esto se ha hecho para asegurarse de que el plugin no guarda el error si este ocurre y no se devuelve un token de acceso.


  • Actualizada la biblioteca PHPMailer a la versión 5.2.26. Esta versión soluciona una potencial vulnerabilidad XSS en la salida de depuración por defecto.
  • Gmail SMTP es ahora compatible con WordPress 4.9.


  • Actualizada la versión mínima necesaria para PHP a la versión 5.6 ya que causaba un error curl_reset() en la biblioteca cliente de la API de Google.


  • Hechos algunos cambios para incluir la biblioteca cliente de la API de Google y PHPMailer sólo cuando es necesario.


  • Actualizada la librería cliente de la API de Google a la versión 2.2.0.
  • Actualizada la biblioteca PHPMailer a la versión 5.2.24. Esta versión contiene un parche de seguridad para solucionar la vulnerabilidad de XSS CVE-2017-11503.


  • Removed the «Basic Setup Instructions» section from the settings page. Full setup instructions are now available on the documentation page.


  • Updated the PHPMailer library to version 5.2.22. This release contains a critical security fix for CVE-2017-5223.


  • Updated the PHPMailer library to version 5.2.21. This release contains a critical security update for CVE-2016-10045 that was fixed in PHPMailer 5.2.20.


  • Updated the PHPMailer library to the latest version (5.2.19). This release also contains a critical security update for CVE-2016-10033 that was fixed in PHPMailer 5.2.18.


  • Gmail SMTP now supports the «wp_mail_failed» hook which fires after a phpmailerException is caught.


  • Added more requirements to the Server Info tab to help with troubleshooting.
  • Compatible with WooCommerce email in HTML format.


  • Added a new option to bypass this error on some servers where the SSL certificate is not properly configured – 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


  • Fixed a bug that was causing this error – «Strict Standards: Non-static method GmailXOAuth2::getClient()»


  • google-api-php-client’s autoloader path now points to the src directory as the current autoloader has been deprecated
  • Gmail SMTP plugin is now compatible with WordPress 4.4


  • Added a new tab to show some server related information
  • More debug data will be shown when sending a test email


  • Fixed a bug where the oauth URL was pointing to localhost


  • Primera versión