codeuino / social-platform-donut-backend

Donut API:
http://donut-api-prod.codeuino.org/
GNU General Public License v3.0
24 stars 57 forks source link

Implements #54-Welcome email feature #55

Closed AuraOfDivinity closed 4 years ago

AuraOfDivinity commented 4 years ago

Implements #54

A welcome email is now sent upon registration. Please check the screenshot below.

Email

The emails are sent using the sendgrid platform. (I have kept the API key for testing purposes)

Would like to know your thoughts. @jaskirat2000

jaskiratsingh2000 commented 4 years ago

Isn't sendgrid platform paid ? Do we have any substitute which is open source and free ?

AuraOfDivinity commented 4 years ago

@jaskirat2000 Sendgrid has a free tier with 30,000 emails for the first month and then 100 emails per month from next month onwards. (Details here). I don't know of any entirely free ones though :( . Most of them have a limited free tier +paid model like SendGrid. I'm open for suggestions!

jaskiratsingh2000 commented 4 years ago

Not sure if third party(SendGrid) would be worth adding. I am taking into consideration about the scalability if donut grows and we can't restrict to 100 users only who signups.

@devesh-verma and @vaibhavdaren what do you think

TG1999 commented 4 years ago

You can use Nodemailer it's free

AuraOfDivinity commented 4 years ago

@TG1999 Thanks for pointing out. I did use nodemailer but I thought it was a must to use a 3rd party transporter like sendgrid etc and didn't consider the option of creating an SMTP server to do the same thing for free. @jaskirat2000 Would it be fine if I created a new gmail account and configure it send emails? Apologies for the misunderstanding on my part.

devesh-verma commented 4 years ago

@jaskirat2000 Sendgrid has a free tier with 30,000 emails for the first month and then 100 emails per month from next month onwards. (Details here). I don't know of any entirely free ones though :( . Most of them have a limited free tier +paid model like SendGrid. I'm open for suggestions!

@jaskirat2000 this is the plan => 40,000 emails for 30 days, then 100/day forever. I feel its quite good for now, we can continue with SendGrid.

jaskiratsingh2000 commented 4 years ago

Oh I misunderstood 100/month but thanks I think then 100/day is quite enough. Let's go ahead with it then.

On Fri, 21 Feb 2020, 6:16 am Devesh Verma, notifications@github.com wrote:

@jaskirat2000 https://github.com/jaskirat2000 Sendgrid has a free tier with 30,000 emails for the first month and then 100 emails per month from next month onwards. (Details here https://sendgrid.com/pricing/). I don't know of any entirely free ones though :( . Most of them have a limited free tier +paid model like SendGrid. I'm open for suggestions!

@jaskirat2000 https://github.com/jaskirat2000 40,000 emails for 30 days, then 100/day forever. I feel it quite good for now, we can continue with SendGrid.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/codeuino/social-platform-donut-backend/pull/55?email_source=notifications&email_token=ACOBHKZZ5ZGBIEBZCMCPOJ3RD4P6RA5CNFSM4KYK4CC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMRDHAI#issuecomment-589443969, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOBHKY4HKCT7XU2ZI4LRBTRD4P6RANCNFSM4KYK4CCQ .

codecov[bot] commented 4 years ago

Codecov Report

Merging #55 into development will increase coverage by 2.57%. The diff coverage is 66.66%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development      #55      +/-   ##
===============================================
+ Coverage        73.44%   76.02%   +2.57%     
===============================================
  Files               11       12       +1     
  Lines              177      171       -6     
  Branches            20       14       -6     
===============================================
  Hits               130      130              
+ Misses              41       35       -6     
  Partials             6        6
Impacted Files Coverage Δ
views/emailTemplate.js 100% <100%> (ø)
app/controllers/user.js 50% <62.5%> (+9.25%) :arrow_up:
app/models/User.js 87.87% <0%> (+10.1%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4a37650...de55d0c. Read the comment docs.

AuraOfDivinity commented 4 years ago

@devesh-verma I have moved emails into a separate service. Also removed the key which was added to dev.env file which was added as a mistake. Do let me know if any other changes are required! :+1:

AuraOfDivinity commented 4 years ago

@devesh-verma Closing this as I made a huge mess caused by rebasing on top of a set of force pushed commits :( . I will commit the changes on a new PR.