Skip to content

Commit 0076d38

Browse files
committed
Fixing email formatting and variables
1 parent 4a7d8cf commit 0076d38

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

config.env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
MAIL_SERVER = environ.get("PACKET_MAIL_SERVER", "thoth.csh.rit.edu")
3737
MAIL_USERNAME = environ.get("PACKET_MAIL_USERNAME", "[email protected]")
3838
MAIL_PASSWORD = environ.get("PACKET_MAIL_PASSWORD", None)
39-
MAIL_USE_TLS = environ.get("PACKET_MAIL_PASSWORD", True)
39+
MAIL_USE_TLS = environ.get("PACKET_MAIL_TLS", True)
4040

4141
# Slack URL for pushing to #general
4242
SLACK_WEBHOOK_URL = environ.get("PACKET_SLACK_URL", None)

packet/commands.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,10 @@ def create_packets(freshmen_csv):
127127

128128
# Create the new packets and the signatures for each freshman in the given CSV
129129
freshmen_in_csv = parse_csv(freshmen_csv)
130-
print("Creating DB entries...")
130+
print("Creating DB entries and sending emails...")
131131
for freshman in Freshman.query.filter(Freshman.rit_username.in_(freshmen_in_csv)).all():
132132
packet = Packet(freshman=freshman, start=start, end=end)
133133
db.session.add(packet)
134-
print("Sending Email...")
135134
send_mail(packet)
136135

137136
for member in all_upper:

packet/mail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
def send_mail(packet):
1010
if app.config['MAIL_PROD']:
1111
recipients = ["<" + packet.freshman.rit_username + "@rit.edu>"]
12-
msg = Message(subject="CSH Packet Starts " + packet.start.strftime('%D'),
12+
msg = Message(subject="CSH Packet Starts " + packet.start.strftime('%A, %B %-d'),
1313
sender=app.config.get("MAIL_USERNAME"),
1414
recipients=recipients)
1515

packet/templates/extend/email.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22
<html lang="en">
33

44
{% block head %}
5-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
5+
<head>
6+
<title>CSH Packet</title>
7+
<link rel="stylesheet"
8+
href="https://assets.csh.rit.edu/csh-material-bootstrap/4.3.1/dist/csh-material-bootstrap.min.css"
9+
media="screen">
10+
</head>
611
{% endblock %}
712

813
<body>
914
{% block body %}
1015
{% endblock %}
1116

1217
</body>
13-
</html>
18+
</html>

packet/templates/mail/packet_start.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<h2>Hello {{ packet.freshman.name }},</h2>
66
<h3>Welcome to Computer Science House!</h3>
77
<p>Soon you'll starting the introductory process for CSH, and the first part of that is Packet.</p>
8-
<p>Your packet will start on <span class="badge">{{ packet.start.strftime('%D') }} at {{ packet.start.strftime('%I:%M %p') }}</span></p>
8+
<p>Your packet will start on <span class="badge">{{ packet.start.strftime('%A, %B %-d') }} at {{ packet.start.strftime('%-I:%M %p') }}</span></p>
99
<p>You can view your packet at <a href="https://freshen-packet.csh.rit.edu">freshmen-packet.csh.rit.edu</a> with
1010
the credentials you should have been sent.</p>
1111
<p>If you don't know your credentials, reach out to an <a href="mailto:[email protected]">RTP</a></p>

packet/templates/mail/packet_start.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Welcome to Computer Science House!
44

55
Soon you'll starting the introductory process for CSH, and the first part of that is Packet.
66

7-
Your packet will start on {{ packet.start.strftime('%D') }} at {{ packet.start.strftime('%I:%M %p') }}
7+
Your packet will start on {{ packet.start.strftime('%A, %B %-d') }} at {{ packet.start.strftime('%-I:%M %p') }}
88

99
You can view your packet at freshmen-packet.csh.rit.edu with the credentials you should have been sent.
1010
If you don't know your credentials, reach out to an RTP

0 commit comments

Comments
 (0)