-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #25: Implement basic email sender #93
Conversation
@RyanWils you can't share username/password pairs on GitHub like this. Please get rid of this account. |
I apologies for putting private information on the previous commit. |
I wonder if we should use something like https://sendgrid.com/ for the mail transport layer. Creating an account in GMail or the like isn't sustainable when it's shared among so many users. There might be other services too, but this is one that came to mind, since we could use it long term for free. |
Thank you for the suggestion, it seems like a good choice (40,000 emails for the first 30 days, then 100/day forever. should be plenty). Ya you make a good point, I think its best to switch from Nodemailer |
@RyanWils I'm not sure if it's what we want or not, but something for you to look at. I think you could use it with nodemailer, or use their node.js API. Needs research. |
https://www.sendinblue.com/ is another one, there are a bunch. |
Using one of these services, for devs who want to hack on the email portion of the code, they could sign up for their own API key, put it in their |
Ya that would be for the best. For whichever service I pick, I will make sure to document the set up steps. |
I messed up on the titles of my commits for the Travis CI fixes as it references other topics. |
Hi Calvin thanks for the solution, but sadly that solution did not work as my master is up to date. I created this pull request 6 days ago, so a lot of stuff got merged and even though I pulled into my master and rebased my branch into master it still says its detached. |
src/email-sender.js
Outdated
service: 'gmail', | ||
auth: { | ||
user: '', // Email Name (.env variables must be used refer to issue#60) | ||
pass: '', // Email Pass (.env variables must be used refer to issue#60) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do SMTP_SERVER
, SMTP_USERNAME
, SMTP_PASSWORD
as environment variables in env.sample
, and you can read them from process.env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thanks for adding params to the send message function, as well as returning a reject or resolve for our transporter.sendMail() function.
0a312eb
Contributes to issue #25
I created a basic email sender using Nodemailer.
To use the function, private information(email/pass,recipients) must be filled once the .env variables are set up.
refer to issue #82 for the tests.
I have also left a comment at the top of the file on how to use this file.