Skip to content
Snippets Groups Projects
Commit e47c25cd authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Merge branch 'tormakris-master-patch-38233' into 'master'

better email memes

See merge request !10
parents 6d4b77a4 36273fc0
Branches master
No related tags found
1 merge request!10better email memes
Pipeline #19610 failed
import os import os
from django.core.mail import send_mail from django.core.mail import send_mail, EmailMessage
import codecs import codecs
import sys import sys
...@@ -22,7 +22,14 @@ def send_out_mail(subject, message, SENDER_EMAIL, receiver_email): ...@@ -22,7 +22,14 @@ def send_out_mail(subject, message, SENDER_EMAIL, receiver_email):
# It is in development # It is in development
print("Email sent from: " + str(SENDER_EMAIL) + " to: " + str(receiver_email)) print("Email sent from: " + str(SENDER_EMAIL) + " to: " + str(receiver_email))
else: else:
send_mail(subject, message, SENDER_EMAIL, [receiver_email, ]) email = EmailMessage(
subject = subject,
body = message,
from_email = SENDER_EMAIL,
to = [receiver_email, ],
reply_to = [SENDER_EMAIL],
)
email.send()
def registration(user): def registration(user):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment