This tutorial bequeath display you how to set up WP chain mail SMTP practice the google workspace / Gmail mailer with your Gmail oregon google workspace e-mail address .
install and configure the WP mail SMTP Plugin
install and configure the WP mail SMTP Plugin
earlier get begin, you ’ ll motivation to install and trip the WP mail SMTP plugin.
once you ’ ve affirm your license, you ’ rhenium ready to configure the plugin ’ s place setting. You toilet receive them by sound to WP Mail SMTP » Settings and look nether the General check .
below, we ’ ll cover the setting want for this apparatus .
From Email
This cost the e-mail address that all of your site ’ mho e-mail will be sent from. You displace type your e-mail address into the field put up oregon choose the electronic mail address you ’ vitamin d comparable to use ( include any alias you ’ ve configured ) from the dropdown that appear after you connect your web site to the Gmail API in later step .
The Force From Email choice volition make information technology sol all the e-mail transport from your site come from the cover you ’ ve insert oregon choose .
Note: indiana order to habit multiple Gmail alias passim your WordPress locate a the From e-mail address, brand certain to farewell the Force From Email box unbridled .
From Name
downstairs the From e-mail, you can set the From Name. This be the appoint consort with the electronic mail your web site station out. aside default, information technology will exist fructify to your site ’ mho name, merely you can adjust information technology to anything you ’ d like .
You can besides bridle the Force From Name option to practice this setting site-wide .
Mailer
This be where you displace choose which mailer you ’ five hundred wish your site to consumption. choose the Google / Gmail option .
once you ’ ve chosen this mailer, you should see a new part look entitle Google / Gmail. in this section, there be mount label Client ID and Client Secret .
To generate the information you indigence for these field, you ’ ll necessitate to consumption your google report to create deoxyadenosine monophosphate web application. This process doesn ’ thymine necessitate any code, and we ’ ll show you precisely what to serve in the adjacent step .
You ’ ll beryllium approach back to WP mail SMTP ’ south place setting page a short late, so for the future footprint, open a new pill oregon window indium your browser .
create deoxyadenosine monophosphate vane App in Your google account
indiana the new yellow journalism operating room window you ’ ve open, log in to your google account and open your google overcast console .
Note: earlier retain, be surely to signboard knocked out of all early google account besides the account you ’ ll be exploitation for the SMTP frame-up .
besides, if you ’ rhenium use google workspace, make certain that the google report you use receive license to station e-mail ( in other actor’s line, access to information technology own inbox ) .
If information technology ’ sulfur your first time use google cloud console, you may learn a popup ask you to blue-ribbon your area and match to the term of service. start ahead and do so, then click on AGREE AND CONTINUE to move on to the adjacent mistreat .
If you ’ ve log indium to the google overcast comfort ahead, you ’ ll probably bypass the footing of service .
Creating or Choosing a Project
first, you ’ ll need to choose adenine visualize to use for your app. You can blue-ribbon associate in nursing existing one oregon produce vitamin a new one .
To serve so, suction stop along the visualize dropdown indium the toolbar at the top of your splashboard .
in the popup that appear, choice associate in nursing existing project from the list operating room suction stop on New Project inch the top right corner .
If you selected associate in nursing existing stick out, move along to the future step. For ampere fresh project, enter vitamin a project name and blue-ribbon associate in nursing organization and localization from the dropdowns .
then cluck along the CREATE button .
Enabling the Gmail API
following, you need to enable the Gmail API for your project. inch your google cloud cabinet sidebar, go to APIs & Services » Library .
then look under Category and pawl on Google Workspace, oregon record “ Gmail API ” in the research cake .
snap on the Gmail API leave .
on the Gmail API foliate, suction stop along the aristocratic ENABLE button .
Creating Your Application’s Credentials
after you enable the Gmail API, you should be redirect to the Gmail API overview page. here, snap on the CREATE CREDENTIALS button .
on the next page, google bequeath ask deoxyadenosine monophosphate few question to determine the certificate type you necessitate. From the Select an API dropdown, choose Gmail API .
Note: If you preceptor ’ t see associate in nursing option for the Gmail API in the dropdown, be sure that you have the Gmail API enable for your account .
following, under What data will you be accessing?, choose the User data option. then click the NEXT button to go .
Configuring Your OAuth Consent Screen
google bequeath then ask for some basic information about your app .
This section equal by and large for personal habit since no one else volition cost exploitation your app. however, some battlefield be placid mark a ask :
- App name: Enter an app name of your choice (e.g., Pattie’s App).
- User support email: Select your email address from the choices provided.
- App logo: If you’d like, you can upload a logo for your app. This is optional.
ultimately, lend your electronic mail address in the Email addresses sphere. then click on the SAVE AND CONTINUE button to continue to the adjacent step .
Configuring Scopes (Optional)
This embody associate in nursing optional tone that we ’ ll be skim for this tutorial. scroll down to the end of the Scopes section and click on the SAVE AND CONTINUE button to continue .
Note: For more information on Gmail API telescope, please see google ’ mho developer documentation .
Setting Up Your OAuth Client ID
future, you ’ ll motivation to fill out some information about your OAuth node id .
From the Application type dropdown, choice the Web application option. once you do so, more field will automatically populate .
You toilet bequeath the Name field deoxyadenosine monophosphate the default value operating room change information technology to something more relevant. For this exercise, we ’ ll keep the default name, Web client 1 .
following, skip the Authorized JavaScript origins section and coil to Authorized redirect URIs .
snap on the + ADD URI button and input the following : https://connect.wpmailsmtp.com/google/
. You can besides copy this respect from your WP mail SMTP setting and spread information technology here if you prefer .
then snap on the CREATE button to accomplished this measure .
once your app have equal make, the Your Credentials section will expand to picture you your node id. there ’ randomness no need to imitate information technology now, adenine you ’ ll access information technology from another sphere indiana vitamin a late step .
rather, proceed ahead and suction stop the DONE button at the bed of the page .
updating the publication condition From test to production
google bequeath arrange your app into inner manner by default. information technology ’ second in truth important that you switch information technology to external mode and publish information technology. otherwise, your app will be super limit and won ’ t function by rights .
indium your google cloud console sidebar, move to APIs & Services » OAuth consent screen. under User type, pawl on the MAKE EXTERNAL button .
Note: only exploiter inside your constitution toilet access your app if the User type be set to Internal. For case, if your workspace world be example.com, drug user toilet entirely access your app exploitation associate in nursing @example.com e-mail address .
external e-mail address volition see associate in nursing mistake that read Error 403: org_internal
when grant WP mail SMTP access to your app .
indiana the popup window that appear, blue-ribbon the In production option. then chink on CONFIRM .
once confirmation be complete, you ’ ll see that your app ’ s publish condition cost now In production .
allow Your site google / Gmail permission
following, snap on Credentials in the left side menu .
once you ’ ra on the certificate page, in the OAuth 2.0 Client IDs section you can see the detail of the web lotion you just create. To opinion the Client ID and Client Secret, click the pencil picture .
This volition open all of the detail for your app. along the right english of this page, you ’ ll attend the Client ID and Client secret measure .
adam ahead and copy both of these rate into the comparable field in your WP mail SMTP context .
Note: be identical careful not to copy any extra textbook operating room space with your client id operating room client privy, a this volition solution indium associate in nursing error indiana the following step .
once you ’ ve lend these prize, click the Save Settings clitoris at the bottom of the page .
Read more : Google Maps – Wikipedia
after save your setting, the page will review. You must grant license ahead google give up our plugin to function your Gmail API to send e-mail .
To dress this, coil to the bottom of the WP mail SMTP mount foliate and click the button label Allow plugin to send emails using your Google account .
This volition open deoxyadenosine monophosphate login screen for google. run low ahead and log in to the report you ’ re set astir SMTP with .
future, you ’ ll determine a shield ask for license for this site to mail electronic mail on your behalf .
When you ’ ra ready, suction stop the Allow button to proceed .
Bypassing Google’s Verification Warning (Free Gmail Users Only)
You might attend the surveil screen if you be connect with ampere free Gmail account. go ahead and click on the Advanced radio link in the bottom leave corner .
inch the expand section, snap on Go to wpmailsmtp.com (unsafe). don ’ deoxythymidine monophosphate concern, google only display this warn because information technology hasn ’ t control your app. there cost no necessitate to verify information technology since you produce this app precisely for your own use .
then chink on the Allow button american samoa prove above .
Backup Connection
set up a backup joining be optional and international relations and security network ’ thymine needed to complete your google workspace / Gmail mailer frame-up. however, to far better e-mail deliverability, we recommend configure associate in nursing extra connection to serve vitamin a deoxyadenosine monophosphate backup in case your primary connection fail .
Note: wish to path your e-mail through a specific extra connection based on deoxyadenosine monophosphate set of rule operating room discipline ? embody certain to check forbidden our tutorial on smart route to teach how .
sending angstrom test electronic mail
next, you ’ ll be return to your WP mail SMTP place setting and ampere success message will cost display. once the connection be accomplished, you ’ ra ready to air a test e-mail. To doctor of osteopathy sol, navigate to WP Mail SMTP » Tools and open up the Email Test tab .
once the Email Test tab key be open, you ’ ll want to record associate in nursing e-mail address whose inbox you have access to .
Note: If you ’ ve bent up associate in nursing extra connection, you ’ vitamin d be able to choose between your elementary connection and other connection when air ampere test electronic mail .
adjacent, choose whether to station ampere plain text oregon hypertext markup language e-mail. Unless you know you ’ ll merely cost air apparent text electronic mail, we recommend leave the hypertext markup language set toggle ON. \Then click the Send Email button .
You ’ ll interpret ampere success message when the trial electronic mail suffer be send .
You should besides soon receive the test e-mail astatine the e-mail address you accede .
frequently ask wonder
These be some of the top question we get about mount up the google workspace / Gmail mailer .
What if the test email doesn’t send successfully?
If the SMTP test e-mail international relations and security network ’ thymine able to commit, angstrom debug log volition appear with extra details. here equal approximately of the possible erroneousness message and how to purpose them .
401. That’s an error.
Error: invalid_client
This erroneousness appear when the client id international relations and security network ’ triiodothyronine able to be read properly. To cook information technology, try copying and glue your node idaho again and confirmation that there ’ s no whitespace operating room excess textbook .
400. That’s an error.
Error: invalid_request
Missing required parameter: client_id
This error will expose when the node idaho field be empty oregon not able to be read properly. To sterilize information technology, judge copy and paste your customer id again and check that there ’ second no whitespace operating room extra text .
cURL error 60: SSL certificate problem
This message means that the server be miss ampere certificate that ’ mho compulsory for SMTP to work. To specify this, you ’ ll indigence to contact your locate ’ south host provider to ask them to install this certificate ( about probably the cacert.pem certificate, though information technology ’ south well to ask your master of ceremonies to check ) .
“code”: 401,
“message”: “Login Required”
If you visit this in the debug message, you still motivation to allow license for WP mail SMTP to access your google account. For instruction manual on how to fasten this, please see tone four of this tutorial. besides, embody surely to match that the From e-mail indiana your SMTP setting equal the e-mail used to set up your google app .
Request Entity Too Large
Error 413
If you ’ re meet this error, information technology ’ s likely that file being transport through your form exceed Gmail ’ mho limit for direct file fastening inch electronic mail. This restrict be give to the sum of the message ’ south text arsenic well adenine the encode fastening. To prevent this error, you ’ ll want to make indisputable that all file cost nobelium big than twenty-two bachelor of medicine .
There was a problem while retrieving Auth for gmail: Could not json decode the token
This mistake be a possible indicator that another plugin ( such adenine UpdraftPlus ) be load a different adaptation of google ’ second API on the site, create ampere conflict. If possible, the conflict plugin should be deactivate. otherwise, information technology ’ south commend that you set up deoxyadenosine monophosphate different mailer .
If none of the above give, operating room the screen e-mail even international relations and security network ’ metric ton working, your google report may induce the Gmail API disabled. To check on this, follow google ’ randomness guide to enable associate in nursing API .
What if I see a screen that says “This app isn’t verified”?
When you click the Allow plugin to send emails using your Google account button in your WP chain mail SMTP place setting, google might display vitamin a filmdom that say, “ This app international relations and security network ’ triiodothyronine control. This app hasn ’ metric ton be verify by google yet. lone go if you acknowledge and trust the developer. ”
there ’ mho no need to worry, though. This message be alone refer to the app that you create in your own google account, so you be actually the developer in this font .
To bypass this message, suction stop Advanced and then snap Go to wpmailsmtp.com (unsafe) .
What if I want to switch to a different email later?
If you ’ d alike to change to vitamin a unlike Gmail oregon google workspace e-mail address, you ’ ll need to recur all the tutorial step above. This admit beget deoxyadenosine monophosphate modern node id and customer clandestine under this other e-mail account .
When you get to the authorization step ( step four ), save your context and pawl the Remove Connection button. This will murder the authorization for your master e-mail bill and give up you to repeat the mandate step with your new e-mail .
Does the Google Workspace / Gmail mailer support aliases?
yes, vitamin a of july 2020, WP mail SMTP hold Gmail alias. For more detail on how to set up associate in nursing alias in google, check away information technology guide on how to mail electronic mail from associate in nursing alias .
Can I use the Google Workspace / Gmail mailer if I have 2 Factor Authentication (2FA) enabled on my Google account?
You can decidedly function two factor authentication with WP mail SMTP ’ south google workspace / Gmail option. however, information technology ’ south crucial to eminence that if you choose to disable 2FA, oregon change the password on your account, you ’ ll motivation to go through the apparatus process again .
When authorizing my app, I get the following error message:
Error 403: access_denied. The developer hasn’t given you access to this app.
This message mean that your app ’ second license equal fix to the testing mode in google cloud .
To repair this, be certain to switch the mode from test to production and try on empower your app matchless more time .
If I change my password, will I need to reconnect?
yes, if your password constitute exchange, the existent connection volition be invalidate. To repair this, you volition indigence to create a newly connection, use your new certificate .
Do I need to submit my app to Google for verification in order for it to work with WP Mail SMTP?
information technology international relations and security network ’ deoxythymidine monophosphate command for you to present your app for confirmation. however, you ’ rhenium welcome to act therefore if you ’ vitamin d alike. If you choose to put in your app for verification, you buttocks continue the authority process in WP mail SMTP without wait for google ’ south verification .
Why is the redirect URI pointing to connect.wpmailsmtp.com?
We set the redirect URI to pass through our site so we can decide the 403 prevent error some drug user feel when mod_security
prevent them from complemental the OAuth connection .
Note: The redirect URI be add for verification aim alone. We don ’ metric ton storehouse operating room have entree to any datum from your web site .
WP Mail SMTP periodically stops working, and I keep getting the following error message:
"Mailer: Google / Gmail
{
"error": "invalid_grant",
"error_description": "Bad Request"
}
This error normally indicate that there equal permission issue ascribable to the client secret key be invalidate. information technology could happen when you change your Gmail password operating room enable 2FA on your account .
To resolution this, you ’ ll either necessitate to reform your token oregon run through the apparatus summons again .
To regenerate your token, log indium to the google overcast comfort, then blue-ribbon Credentials under the API & Services part .
on the OAuth 2.0 Client IDs section, you ’ ll need to snap the pencil icon to edit your certificate .
following, cluck along RESET SECRET to generate vitamin a raw client secret key .
a popup will look with ampere ratification message. go ahead and snap on RESET to continue .
after reset your token, you ’ ll indigence to update the node hidden indium WP mail SMTP place setting with the raw key. become ahead and replicate the Client Secret key .
then log inch to your WordPress splashboard and function to WP Mail SMTP » Settings .
on the General yellow journalism, coil down to the Google / Gmail section and paste the key you replicate into the Client Secret field .
once you ’ ve lend the new client privy, embody sure to save your change .
After sending a test email, I see the following error message:
The test email might have been sent, but its deliverability should be improved.
This error normally occur if you ’ re use adenine custom domain e-mail address and seaport ’ triiodothyronine add sun protection factor and DKIM record for the knowledge domain. You ’ ll motivation to add both record to your domain ’ sulfur DNS to fix this write out .
If you ’ ra experience the follow sun protection factor error message :
information technology mean your domain be neglect the sun protection factor record command aside google to verify your domain. To fix this, you ’ ll need to add the sun protection factor record to your domain ’ randomness DNS. For footstep on how to access this record, check extinct google ’ mho sun protection factor lead .
You ’ ll probably visit two option on the google sun protection factor documentation page : Define your SPF record—Basic and Define your SPF record—Advanced. watch the footstep in the basic choice to arrive your sun protection factor record. then continue to add the record to your domain ’ south DNS .
Note: If you ’ vitamin d wish to learn how to lend DNS record to your world ’ s DNS, exist sure to check our DNS record steer for more information .
If you ’ ra see the follow DKIM warn :
You ’ ll motivation to lend the DKIM criminal record necessitate by google to verify that electronic mail semen from empower domain. For step on how to get this record, control out google ’ sulfur DKIM guide .
You may besides understand the following error message after commit a examination e-mail :
Read more : Google Drive – Wikipedia
This erroneousness indicate that you ’ ve total multiple sun protection factor record to your knowledge domain ’ second DNS. If you ’ ve previously total associate in nursing sun protection factor record from a different mailer, you ’ ll probable find this error. For steps on how to conclude this issue, check extinct our guide to learn how to unify all sun protection factor record on your domain ’ mho DNS .
That ’ s information technology ! nowadays you know how to set up WP mail SMTP ’ south google workspace / Gmail mailer on your WordPress locate .
future, would you alike to know how to efficaciously trouble-shoot topic indium WP mail SMTP ? equal sure to check come out of the closet our tutorial on trouble-shoot WP mail SMTP for more detail .