=== Postman SMTP === Contributors: jasonhendriks Tags: mail, email, mailer, smtp, smtps, oauth, oauth2, phpmailer, wp_mail, gmail, google apps Requires at least: 3.8 Tested up to: 4.1 Stable tag: 0.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Kiss your Gmail problems good-bye with Postman, the first and only OAuth-enabled SMTP Plugin for WordPress. Never give out your password again! == Description == ** Please Note: Testing FAILED in a GoDaddy environment with error "Warning: Cannot modify header information - headers already sent." I'm working on a fix ** Having [trouble getting Gmail to send your email](https://wordpress.org/support/topic/smtp-connect-failed) recently? You could ask Gmail to [allow less secure apps](https://support.google.com/accounts/answer/6010255), but only if you don't use Google Apps to manage your domain. As Google tightens their security, the proper solution is to send your mail with "the most up to date security measures", i.e. SMTPS with OAuth 2.0 authentication. As of July 2014, this is [recommended](http://googleonlinesecurity.blogspot.ca/2014/04/new-security-measures-will-affect-older.html) and in some cases, [required](https://support.google.com/accounts/answer/6010255) for sending mail via Gmail. Postman is a next-generation SMTP plugin which seemlessly overrides the default WordPress wp_mail() call and provides the OAuth authentication. Any other plugins that send mail, such as [Contact Form 7](https://wordpress.org/plugins/contact-form-7/) or the WordPress Lost Password feature, will automatically use this mechanism to send mail. Tested on a RedHat OpenShift installation. Requires a Gmail or Google Apps account, and corresponding OAuth Credentials from Google Developer. Requirements: * A Gmail or Google Apps account * A Client ID from Google Developer * Port 465 (TCP, outbound) must be open What's planned for the future: * Attachments and Custom Headers * Wizard interface * Ability to revoke the refresh token at Google * Ability to remove the stored token from WordPress * Namespacing of the external API's for compatibility with other plugins * WordPress MultiSite compatibility * Compatibility with other mail providers (e.g. Hotmail) Your feedback is appreciated!! Please send feature requests and/or bug reports. == Frequently Asked Questions == = Why should I use Postman to deliver my mail? = *Postman* doesn't require your password to send email, only an *authentication token*. Other plugins need your Gmail password to send mail securely via SSL/TLS. **NEVER give out your Google password** to a 3rd-party or 3rd-party program that you don't fully trust. = What is a Client ID? = Every website and/or application has their own Client ID. It's used to control authentication and authorization and is tied to the specific URL of your website. Google has [instructions for creating a Client ID](https://developers.google.com/console/help/new/#generatingoauth2), which I've expanded upon below. = How do I get a Google Client ID? = 1. Go to [Google Developer's Console](https://console.developers.google.com/) and choose Create Project, or use an existing project if you have one. 1. If you have previously created a project, select it from the Projects page and you will arrive at the Project Dashboard. If you have just created a project, you are brought to the Project Dashboard automatically. 1. If you have not filled out the consent screen for this project, do it now. In the left-hand hand navigation menu, select *Consent Screen* from under *APIs & auth*. Into *email address* put your Gmail address and in *product name* put the name of your WordPress site. Choose *Save*. 1. Select *Credentials* from under *APIs & auth*. Choose *Create a new Client ID*. 1. For the *Application Type* use "Web application". The first URL (*Authorized Javascript origins*) will be the root address of your WordPress site. The second URL (*Authorized Redirect URIs*) will be the the redirect URI shown on *Postman's Settings page*. 1. Choose *Create Client ID*. 1. Now you can enter the Client ID and Client Secret shown into Postman's settings page. == Installation == 1. Activate the plugin through the 'Plugins' menu in WordPress. 1. In the WordPress 'Settings' menu find 'Postman SMTP'. 1. In *Sender Email Address* enter your account's email address. This should be the same address you login to Google with. 1. Go to [Google Developer's Console](https://console.developers.google.com/) and create a Client ID for your WordPress site.. [instructions for this are detailed in the FAQ](https://wordpress.org/plugins/postman-smtp/faq/) 1. Copy your *Client ID* and *Client Secret* into the plugin's Settings page. 1. Choose the Save Changes button. 1. Choose the *Request Permission from Google* button and follow the instructions. 1. Send yourself a test e-mail. == Screenshots == 1. Creating a new Client ID with Google 1. The required Client ID and Client Secret 1. If you use [Google Apps](http://admin.google.com) to manage your domain, you HAVE to use OAuth == Upgrade Notice == Now accepts multiple recipients when sending email. == Changelog == = 0.2 = * wp_mail accepts multiple recipients (array and string) * display a warning to the user if another plugin is preventing Postman from overriding wp_mail * paired down the external libraries to only what was required - from 3,700 files to just 75 * default Gmail port corrected to 465 - previously 465 was hardcoded but 587 was saved to the database * Added 'Delete All Data' button to erase the stored tokens * OpenShift production problem: This environment didn't like the callback and there were possibly invalid characters in the source script = 0.1 = * 2015-01-19 - First release. Happy Fig Newton Day! It was a grueling week-end, studying PHP and OAuth and Googling like a Boss, but it's done and it works!