-
Notifications
You must be signed in to change notification settings - Fork 0
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
Rejection Email Automation #17
base: master
Are you sure you want to change the base?
Conversation
def rejection(): | ||
form = request.json | ||
if not rejection_schema.validate(form): | ||
return Response(status=400) |
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.
Is there any way to get a more detailed response for how the request is invalid?
msg.set_content( | ||
"\n".join( | ||
[ | ||
f"Hi {recipient_name},", |
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.
Do we only have 1 rejection email? I thought we had different ones for different stages
) | ||
|
||
with smtplib.SMTP(host, 587) as server: | ||
server.login(username, password) |
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.
This seems slightly inefficient/could cause problems since it's logging into our email for each individual rejection. I think it may make more sense to login only once.
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.
ditto -- bulk rejection sounds like a better API for the endpoint, this function could just be called in the loop and passed the SMTP object.
[ | ||
f"Hi {recipient_name},", | ||
"" | ||
"Thank you for taking the time to apply to Penn Labs! This semester's recruitment process was difficult, and unfortunately we were not able to accept your application at this time.", |
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.
Using Jinja or some other templating language would probably be better in the long run than adding the template in the code
"We know that rejections from clubs can be disheartening, but we sincerely hope that you continue building and looking for ways to improve the Penn experience. Many of our members were not accepted on their initial application attempt, but they continued to learn, and are now some of our most valuable contributors. On that note, we have a few bits of advice to help grow the skills and passions you very clearly have:", | ||
"\t1. Identify a problem at Penn, then go out and solve it: There are so many problems at Penn you can solve and we want to see the amazing things you can do even outside of Penn Labs! We also have APIs for you to use!", | ||
"\t2. Immerse yourself in the world of products: There are a lot of great resources out there to dive deeper into product development and design. Product Hunt and Dribbble are great places to find inspiration - find things you like and think about how they're built.", | ||
"3. Build something: Seriously, anything. Even if it's not super cool at first, you'll learn an incredible amount in a short amount of time. Many of our developers started school with little experience, but over the course of a semester or even a break, picked up a new language and started building non-stop.", |
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.
"3. Build something: Seriously, anything. Even if it's not super cool at first, you'll learn an incredible amount in a short amount of time. Many of our developers started school with little experience, but over the course of a semester or even a break, picked up a new language and started building non-stop.", | |
"\t3. Build something: Seriously, anything. Even if it's not super cool at first, you'll learn an incredible amount in a short amount of time. Many of our developers started school with little experience, but over the course of a semester or even a break, picked up a new language and started building non-stop.", |
Short Python script I used to test the new
/rejection
endpoint: