Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/instance-id/nodebb-plugin-emailer-gmail-oauth2
An emailer plugin for NodeBB using Gmail Oauth2 as a third party service
https://github.com/instance-id/nodebb-plugin-emailer-gmail-oauth2
Last synced: about 7 hours ago
JSON representation
An emailer plugin for NodeBB using Gmail Oauth2 as a third party service
- Host: GitHub
- URL: https://github.com/instance-id/nodebb-plugin-emailer-gmail-oauth2
- Owner: instance-id
- License: mit
- Created: 2019-04-26T23:46:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T21:41:26.000Z (almost 2 years ago)
- Last Synced: 2024-10-27T05:08:24.583Z (11 days ago)
- Language: JavaScript
- Homepage:
- Size: 142 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NodeBB Emailer (Gmail-Oauth2)
This NodeBB plugin allows NodeBB to send emails to users through the third-party transactional email service [Gmail-Oauth2](http://gmail.com).
To customise options for this plugin, please consult the "Emailer (Gmail-Oauth2)" page in the administration panel, under the "Plugins" heading.## Why you might want to use this plugin?
Hello,
I appreciate you taking a look at my plugin. The purpose for this plugin was, I have a Google for Business account and so I have multiple domains (a primary which is my actual account email, but then secondary/alias domains, which when receiving emails, they all come into one inbox) on my account in which I can send and receive emails.With the "normal" way of using Gmail to send emails, you have to use your account login and password and it just sends as the email address in which your account login is. I wanted to be able to send out emails from NodeBB from one of my secondary/alias domains, with this plugin, you are able to do just that!
## Installation
Setup takes a few steps, so instead of rewriting all of the instructions from scratch, I am going to include some links to some in depth and very informative setup guides for some of the more standard parts of the install on the Google/Gmail side of things.
After installation and activation of the plugin, you can go to the Plugins menu in the admin page and you will find "Emailer (Gmail-Oauth2)". Inside there you will see places to input some data. In the link below you will find the instructions necessary to generate and obtain most of that information.
https://masashi-k.blogspot.com/2013/06/sending-mail-with-gmail-using-xoauth2.html
(Many thanks to the writer of this blog post)After you follow all the steps within the blog above, you would have 5 total pieces of information.
````text
- ClientID
- ClientSecret
- RefreshToken
- Account (Authentication) Email: (the primary email address of your account for authentication purposes)
- Authorized URL (This will be the URL of your forum, ex. https://forum.mysite.com)
````You will then input that information into the Emailer(Gmail-Oauth2) plugin page, save, and then rebuild/restart your forum.
After that is complete, in your admin panel, go to the Settings tab, and then Email.
On this page, under the Email Address section, you will input the email address you would like your email from the forum to actually be sent from as well as what you would like the display name to be.Below that you can turn off the tiggle for "Use an external email server to send emails"
Once those are complete, you should be able to save your settings and then scroll down to the "Send Test Email" button, which should deliver a test email to you from your newly setup alias account!
-----------------
##### IMPORTANT NOTES - In order to send email from an address that is not your accounts primary email address it *must* be added to your gmail account as a secondary / alias email account. To know if it is properly added, you can open the https://mail.google.com and click Compose to begin writing a new email. In the From: field of the email message, if you are able to hit a dropdown and select a different email address to send from, then you will be able to put that address into the "Email Address" section within the Email Settings box. If not, you must properly add the domain and address to your account as a secondary/alias domain/address.
Here are instructions for adding a secondary/alias domain to your Gmail account.
Here are instructions for adding a secondary/alias email address to your Gmail account to be able to actually use it once the domain is added to your account as per above.
![alt text](https://i.imgur.com/cg5ow2M.png "instance.id")