How to setup wp mail smtp gmail
To set up WordPress to use Gmail's SMTP server for sending emails, you'll need to follow these steps:
Step 1: Create a Gmail account and enable less secure apps
- Create a new Gmail account or use an existing one.
- Go to the Google Account settings page and sign in with your Gmail account.
- Click on the "Security" tab.
- Scroll down to the "Less secure app access" section and toggle the switch to "On".
Step 5: Generate an App Password
- Go to the Google Account settings page and sign in with your Gmail account.
- Click on the "Security" tab.
- Scroll down to the "Signing in to Google" section.
- Click on "App passwords".
- Select "Mail" as the app type.
- Select "Other" as the device type.
- Enter a name for the app password (e.g., "WordPress").
- Click "Generate".
- Note down the generated app password.
Step 2: Install and configure the WP Mail SMTP plugin
- Install the WP Mail SMTP plugin from the WordPress plugin directory or by uploading it manually.
- Activate the plugin.
- Go to the plugin's settings page by clicking on "WP Mail SMTP" in the WordPress admin menu.
- Enter your Gmail address and password in the "SMTP Settings" section.
- In the "SMTP Authentication" section, select "Username and Password" and enter your Gmail address and the app password you generated earlier.
- Set the "SMTP Port" to 587 (or 465 if you're using SSL).
- Set the "SMTP Encryption" to "TLS" (or "SSL" if you prefer).
- Click "Save Changes".
Step 3: Configure the WordPress settings
- Go to the WordPress admin menu and click on "Settings" > "General".
- In the "Mail Settings" section, select "WP Mail SMTP" as the mailer.
- Set the "From Email" and "From Name" fields to your desired values.
- Click "Save Changes".
Step 4: Test the email sending
- Go to the WordPress admin menu and click on "Tools" > "Mail Tester".
- Fill in the test email form with your desired recipient's email address and a test message.
- Click "Send Test Email".
- If everything is set up correctly, you should receive the test email in your inbox.
That's it! Your WordPress site should now be using Gmail's SMTP server to send emails.