Skip to content
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

GSoC 2019 - Send email template #5

Closed
botanicvelious opened this issue Feb 8, 2019 · 15 comments
Closed

GSoC 2019 - Send email template #5

botanicvelious opened this issue Feb 8, 2019 · 15 comments
Labels
enhancement New feature or request good first issue Good for newcomers and GSoC students

Comments

@botanicvelious
Copy link
Collaborator

This task is to add the ability to send an email based on templates.

You will need to create at least 2 basic templates and have the system able to be told which template to use and send an email to the specified address using that template.

Bonus points: Be able to specify data to replace in the templates for example "Name"

@botanicvelious botanicvelious added the good first issue Good for newcomers and GSoC students label Feb 8, 2019
@botanicvelious botanicvelious added the enhancement New feature or request label Feb 16, 2019
@ujjwalll
Copy link

Can I work on this issue?

@botanicvelious
Copy link
Collaborator Author

go for it!

@botanicvelious
Copy link
Collaborator Author

botanicvelious commented Feb 19, 2019

Also just so you know this would be used by the scheduler system, it is being worked on as part of pr #32 so its probably easiest to pull down the code in his pr and then just expand the

def send_email(scheduler):
    return True

with the new code, you would return a true on a success, false on failure, along with the error message.

@ujjwalll
Copy link

I am creating a page in which one can select one email template and write the email address to which it is supposed to be delivered and then he can type the name and the mail will be sent to that person? I am creating this template through jinja templating.

@botanicvelious
Copy link
Collaborator Author

botanicvelious commented Feb 19, 2019

It shouldn't be a page, this would be for an automatic sending of an email, basically you would be passed something like

{
  "to_email": "test@email.com",
  "template": "testemail.template",
  "from_email": "test@python-gsoc.org",
  "Subject": "test email!",
  "data": {
    "username": "test",
    "message": "this is a test message"
  }
}

to the send_email function that you are working on, then it would take that json and parse it to do the template filling in etc

@ujjwalll
Copy link

Okay, I got it, I am taking it in a template way, sorry for that, I will try to complete this.

@botanicvelious
Copy link
Collaborator Author

botanicvelious commented Feb 19, 2019

Just fyi pr #32 has been merged so you can just pull the latest code from the repo and go about editing the send_email function.

@ghost
Copy link

ghost commented Mar 25, 2019

@botanicvelious I'd like to work on this since there is no update for a month

@botanicvelious
Copy link
Collaborator Author

@ntkomata go for it

@Saurabh-Singh-00
Copy link
Contributor

{
  "to_email": "test@email.com",
  "template": "testemail.template",
  "from_email": "test@python-gsoc.org",
  "Subject": "test email!",
  "data": {
    "username": "test",
    "message": "this is a test message"
  }
}

@botanicvelious So the above json will be in scheduler.data field ?
image
Something like this?

@ghost
Copy link

ghost commented Apr 2, 2019

@Saurabh-Singh-00 The message should be a django template string.
i'm working on this btw :)

@ghost
Copy link

ghost commented Apr 3, 2019

@Saurabh-Singh-00 Uhh actually no. The message should just be a string since it's the template data. Sorry, I wasn't looking :)

@botanicvelious
Copy link
Collaborator Author

@ntkomata why wouldn't it be that? the data is how you would choose the template etc

@ghost
Copy link

ghost commented Apr 3, 2019

@botanicvelious umm I'm saying the "data" in the data field :) it should be a json array with raw strings inside right?
And maybe it should be named "template_data"

@botanicvelious
Copy link
Collaborator Author

the data field could be data for the irc bot, or otherwise, it is the "data" for the "command"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers and GSoC students
Projects
None yet
Development

No branches or pull requests

3 participants