diff --git a/rowers/templates/contactformemail.html b/rowers/templates/contactformemail.html new file mode 100644 index 00000000..6ac0a5fa --- /dev/null +++ b/rowers/templates/contactformemail.html @@ -0,0 +1,24 @@ +{% extends "emailbase.html" %} + +{% block body %} +
New Contact Form Message
+ ++ From: {{ firstname }} {{ lastname }} +
++ Email: {{ email }} +
++ Subject: {{ subject }} +
+ ++ {{ message }} +
+ + ++ Best Regards, the Rowsandall Team +
+{% endblock %} diff --git a/rowers/views/statements.py b/rowers/views/statements.py index 88d24d87..5c07b20e 100644 --- a/rowers/views/statements.py +++ b/rowers/views/statements.py @@ -1290,11 +1290,24 @@ def sendmail(request): subject = 'Rowsandall Contact Form:'+form.cleaned_data['subject'] message = form.cleaned_data['message'] fullemail = firstname + " " + lastname + " " + "<" + email + ">" - try: - send_mail(subject, message, fullemail, ['info@rowsandall.com']) - except: + d = { + 'firstname': firstname, + 'lastname': lastname, + 'email': email, + 'subject': subject, + 'message': message, + } + res = send_template_email('Rowsandall