Gmail recently added email actions to allow its users to take actions directly from their inbox ( good enough for lazy pals like me ). These action allows you to review things, provide links(like you tube provides watch video button in gmail), perform other actions.
You can refer Gmail official blog for feature details.
And I’ve used the same for approving WordPress comment directly from email , thank you Incsub for the nice idea! :).
You can check the WordPress plugin: Gmail Comment Approval
Before you start using the plugin, you need to make sure that you fulfill some of the requirements to make it work with Gmail.
Install and activate the plugin
After successful installation, you need to make a dummy comment on your site.
If the comment moderation is turned on, you will receive a comment approval email.
Registering with Google
Register your site email with Gmail to allow action button to appear in the site moderator Gmail address.
- In order to register with Gmail, you need the sample email you got for comment approval.
- Forward the email to: email@example.com with proper subject.
- Copy the email subject and fill up the registration form, you need to add email headers at the form end. In order to get email headers, refer Viewing Message Header in Gmail
SPF/DKIM signed emails
One of the important requirement for Gmail actions is signing of emails using SPF or DKIM, for proper security measures.
Testing email for DKIM/SPF signatures
You can check if your emails are SPF/DKIM signed or not at Mail Tester
If it is not signed properly, you need to add the signatures. If you are using VPS or a dedicated hosting like Digital Ocean you can install it using the tutorial DKIM with Postfix.
For shared hosting you need to contact hosting provider for allowing DKIM signing of emails.
If you are using DKIM signing, make sure you haven’t enabled test mode.
Also you can use 3rd party services like Postmark or Google Apps for mail delivery, they provide proper signing of emails.
As soon as your done with registration, Gmail will show you ‘Approve Comment’ in your email.
In case you are sending email to your own email, you need not to register for it, the action button appears by default.
Hope it saves some time for you.