Skip to content

Conversation

@Lontronix
Copy link
Member

Also sends an email when evals updates an active members house meeting
attendance.
Screenshot 2021-02-14 at 01 27 11
Screenshot 2021-02-14 at 01 27 26

Also sends an email when evals updates an active members house meeting
attendance.
Comment on lines +1 to +6
import smtplib
from email.mime.text import MIMEText
from email.utils import formatdate
from email.mime.multipart import MIMEMultipart
from datetime import date
from conditional import app
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please organise these like in the rest of conditional:

  • python modules
  • pip modules
  • local conditional modules

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already the case

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separate with a line break please

from conditional import app

def send_absent_hm_attendance_emails(absent_members):
today_date = date.today().strftime("%m/%d")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an ambiguous date format. Why not do 06 January instead? This doesn't need to be terse, so be readable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was done to be consistent with the emails sent out by quotefault. And at least in the subject line conciseness is better imo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotefault does not include a date in emails. Please don't be terse in the body, at least.

@Lontronix
Copy link
Member Author

Will squash into a single commit once approved.

@Lontronix
Copy link
Member Author

Note that triple quoted strings keep all formatting, so the line breaks go with it.

Maybe that's what you're intending to make it less wide in email clients, but if you wanted it to be one line in the actual resultant body, then you could use body += to keep appending without making your lines endlessly long.

I did not know that, yikes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants