Closed psybuzz closed 10 years ago
From what I understand above, using the nodemailer makes sense. In terms of security, it'd definitely be good to use another email for notifications down the road.
Defaulting the rest of it to Mr. @nikilselvam. Aside from that, it LGTM!
Finished reviewing. I just have a couple of questions to make sure that our style is consistent (which I think it is in these changes) and one for my curiosity about what we're changing about the conversation creation button in particular, but other than that this change looks solid. LGTM
Also, after this change gets merged in it looks like I'm gonna need to create a new Gmail filter for goldenconversations@gmail.com ;)
Okay, I just replied to your comments @nikilselvam!
Cool, I'm all clear on this change. Thanks for talking through some of the concepts in this one with me, @psybuzz! I think this discussion will help us all understand the CS underpinnings a little bit better and allow us to design more effectively in the future. LGTM!
D: something's not right! According to Heroku logs, there is a reported "EAUTH Invalid login" error, so the mailman can't send email from Heroku's box. I suspect that Gmail thinks that it's suspicious activity, but strangely, running GC locally is able to send emails fine.
More on this story soon...
Okay! Mailman should be alive and well now, thanks to some instructions from the big G: https://support.google.com/mail/answer/78754
Turn on your filters, GC mail is here!!!
This PR introduces the Mailman, via mailman.js! Thanks to an open source npm module 'nodemailer', we can send emails via our Gmail account. By the way, because we can send emails programmatically, Google sent us an email to JRR saying that our Gmail account is less secure. I think that we should eventually make another Gmail address whose sole purpose is to serve as an email sending endpoint, for greater security.
The first commit is our code, the second commit should just be the 'nodemailer' module.
After this PR, email messages will be sent to email addresses / people when a conversation is created, and to active participants when a new post is created in a convo that they are involved in.
These changes do not address what happens when you invite someone to a conversation using their email address if the recipient hasn't yet registered with GC. Nor does it address having settings for preventing email notifications.
Also, this code won't work locally until you copy the secret.js file I sent you guys into your root goldenconversations/ directory. I'm hoping that PR #15 will get merged in first, after which, the credentials could be further separated for this PR.