Skip to content
This repository was archived by the owner on Feb 3, 2024. It is now read-only.

Commit 615c966

Browse files
authored
Merge pull request #63 from jabbate19/mail-server-name
Allow Mail to Use Any Server Name in Email
2 parents 0827af3 + f0f2b6f commit 615c966

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

quotefault/mail.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def send_report_email(reporter, quote):
2121
sender=app.config.get('MAIL_USERNAME'),
2222
recipients=recipients)
2323
template = 'mail/report'
24-
msg.body = render_template(template + '.txt', reporter = reporter, quote = quote )
25-
msg.html = render_template(template + '.html', reporter = reporter, quote = quote )
24+
msg.body = render_template(template + '.txt', reporter = reporter, quote = quote, server = app.config['SERVER_NAME'])
25+
msg.html = render_template(template + '.html', reporter = reporter, quote = quote, server = app.config['SERVER_NAME'])
2626
mail_client.send(msg)
2727

2828
def send_email(toaddr, subject, body):

quotefault/templates/mail/report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h3>There is a new report on QuoteFault</h3>
77
<p>Report submitted by: {{reporter}}</p>
88
<p>Quote being reported: {{quote.quote}} -{{quote.speaker}}</p>
99
<p>Quote submitted by: {{quote.submitter}}</p>
10-
<p>Please attend to this on the <a href="https://quotefault.csh.rit.edu/admin">QuoteFault Admin Page</a>!</p>
10+
<p>Please attend to this on the <a href="https://{{server}}/admin">QuoteFault Admin Page</a>!</p>
1111
</div>
1212
{% endblock %}
1313

quotefault/templates/mail/report.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Hello EBoard/RTP
33
Report submitted by: {{reporter}}
44
Quote being reported: {{quote.quote}} -{{quote.speaker}}
55
Quote submitted by: {{quote.submitter}}
6-
Please attend to this on https://quotefault.csh.rit.edu/admin
6+
Please attend to this on https://{{server}}/admin
77

0 commit comments

Comments
 (0)