Public Lab Research note

GSoC proposal: Email integration Project

by namangupta |

Read more:

(This template is for students applying to summer code programs with Public Lab. Use this link to start writing a post:,soc-2018,soc-2018-proposals You can delete this line once you've started filling it out.)

About me

Name: Naman Gupta

Affiliation: Guru Gobind Singh Indraprastha University, New Delhi, India-110078

Location: Delhi, India-110034

Github: namangupta01



Project: Email Integration Project

Web Link:

Project description

Email integration project

Abstract/summary (<20 words):

Implementing delayed background jobs, cron jobs for sending daily/weakly/monthly/ trending email digest to the subscribers.

Reply-by-email to comments feature.


The current implementation of Email System in PLOTS2 doesn't implement Active Jobs i.e queue feature because it is currently using rails 4.1. And rails 4.1 doesn't implement Active Jobs on its own. We have to ways to resolve this either include activejob gem or upgrade to rails 4.2 (we will go with this). So currently, mails are sended synchronously. And if the sending of mail is failed due to some reason or we don't want to send the mail at the time of request/response or if we want that a mail should be sent after (1 day or any specific period of time) we can't implement it now.

Sometimes, we have to run jobs at particular intervals to, say, backup logs, send emails, etc. In rails application we can schedule such tasks using the whenever gem.

For integrating cron jobs with the plots2 we can implement whenever gem which will be very useful in sending daily "batch digest" email to the subscribers. We can specify the time when the email should be sent. More details on implementation is in Implementation part.

Another feature is the reply-by-email feature using mailman gem which currently have three types of receivers: Standard Input, Maildir, and POP3. POP3 is used most often.

Project Goals

During this GSoC season I would deliver:

  • Including Active Jobs in project.
  • Implementing whenever gem to work with Active Jobs to perform delayed jobs.
  • Implementing mailman gem which will be used in reply-to-comment via email feature.
  • Implementing reply-to-comment via email feature.
  • a user interface for managing digest settings and email notification settings.


3.1 Including Active Jobs

Currently, plots2 is using rails 4.1 and rails 4.1 don't implements Active Jobs so it should be updated to rails 4.2 so that we can use delayed jobs with the help of Active Jobs. On which i am currently working.

3.2 Implementing whenever gem

For implementing cron jobs with our application we can use whenever gem. The steps for implementing this gem are specified below :

1. Include whenever gem in Gemfile

2. Type command wheneverize . in the root folder of the application which will create an initial config/schedule.rb

3. After typing above command also type command whenever which will create a file schedule.rb

4. Now edit the schedule.rb file to add cron jobs. The best things about whenever gem is that it makes it easy to write cron jobs in simple ruby language.

  • For Example:
every, at: '4:30 am' do  
 runner "MyMailer.send_daily_digest.deliver_later"  

every, at: '4:30 am' do  
 runner "MyModel.task_to_run_at_four_thirty_in_the_morning"  

every 3.hours do # 1.minute 1.week 1.month 1.year is also supported  
 runner "MyModel.some_process"  
 rake "my:rake:task"  
 command "/usr/bin/my_great_command"  

5. Now run command whenever --update-crontab update the schedule.rb file and to enjoy cron jobs.

More to come -----working on it.


Working on it


Break your project up into small projects -- one per week!

See this page for guidance on breaking your plan up into small, self-contained parts:

Working on it


working on it

First-time contribution

_Have you looked over our welcome page and are you familiar with how to make your first contribution? Have you already made it? We're eager to see that you've had a good experience making a small initial contribution to our site. Please check out our welcoming page: _

And paste in links to your initial contributions here so we can see!


I have been working on the the Web Technology from more than 1.5 year. And have developed many applications on rails as well as on other technology.

I have also worked as Tech Head in Google Developers Group - BVCOE which is a technical community and also took various workshops and sessions as mentor on different technology.

I have also worked as Teaching Assistant for Web Development Course (which is a Ruby On Rails course) in Coding Ninjas ( where my job was to mentor the student and help them in their Web Projects.

I am currently working as Web Developer Intern in Edusquare and working on building their online test platform for preparing for prestigious Engineering Entrance Exams in India. These platforms are build using various technology -- Ruby On Rails, Python, Flask, AngularJs and Backbone Js.


I have been actively volunteering in various community where i have showed my skills of teamwork and hard work. I am currently volunteering in Google Developers Community and i have also organised hackathon in my college and worked as one of the organiser.

Open Source Contribution

I have been working on the open source projects from the past eight months. I have contributed to organisations like Public Labs and OpenSUSE.


The things that interest me the most about public lab is the science and environments because i am very passionate and have very deep interest in science particularly in physics --understanding how the law works in nature.


This project will make the publiclab user experience good whether it is reply by email feature or getting daily/weekely/ monthly/treading email digest to the subscribers.


Yes, i do understand this is a serious commitment and i will give my full dedication and commitment to this project .

software gsoc soc gsoc-2018 soc-2018 rgsoc-2018 soc-2018-proposals soc-2018-email



Wheeee! A third proposal for email integration! I'm going to re-iterate what I wrote to @gauravano and @vidit -- this is a highest-priority project for us, so we'd love to see multiple people tackling this from different sides. It's not a problem if multiple people are accepted; we will have to break the broader project down into parts so that it's possible for multiple people to work on at the same time.

For all three of you, do look at proposals by others doing Rails 5 upgrade work: @souravirus, and @meghana-07 have both proposed this. #15826 #15814 There may be some cooperation and work sharing on the Rails 4.2 upgrade which ActiveJob requires -- even before the summer begins!

Perhaps with three people interested, my comments about how to break it up could be taken even further -- discuss! I also proposed a possible "reply by tweet" concept on @gauravano's post, so maybe that's another area where a third person could get into things.

Awesome, please read one anothers' posts and provide each other with some feedback! And don't worry about overlapping -- as i said before, it's a powerful motivator to break things up into smaller parts so that multiple people can work in parallel on different parts of the problem. Thanks!!!

@warren i would love to help in upgrading to rails 4.2 and even i am currently working on this. And as you said about the reply-by-tweet concept on @gauravano's i am happy to work on this. I will update the proposal regarding this concept soon.

And @warren what do you think of having an email creating editor for the admin to send emails to the users ?

Is this a question? Click here to post it to the Questions page.

@warren i just have one doubt in reply-by-tweet concept. If this is going to be used for replying to comments then how will the user will do tweet in reference to particular comment? We have to give some reference in the tweet so that the comment is identified and rest of the things can be handled by cron jobs using whenever gem.

Is this a question? Click here to post it to the Questions page.

The idea with "reply by tweet" is that we automatically tweet out each note -- this we do already, at (using -- so any replies to that tweet would get copied back to the original note.

You're right -- the reference back may be tough. We could:

  1. follow the link in the tweet to resolve the correct node to comment on
  2. post the tweets in a different way and save the tweet ID, and perhaps save that in a tag like tweet:___ID___ on the node

i'm sure there are other ways too!

email creating editor for the admin to send emails to the users

This is interesting -- what about something similar, where we have a way to notify groups of people, like how we do on GitHub like @publiclab/reviewers -- a "group" handle. On plots2, we could do: @g/partsandcrafts -- to notify people who have the profile tag partsandcrafts. We may also want to ensure that only moderators can do this, or it'll create a lot of email flying around!

Let's make an issue for this last idea and add it to the list of email features. It's not high-priority but could be pretty easy to implement, given profile tagging and the existing email templates.

@namangupta as the timeline is near can you please update the remaining sections so that the potential mentors can review it ??

Is this a question? Click here to post it to the Questions page.

You must be logged in to comment.