fix: email from
This commit is contained in:
parent
6c7ae3b885
commit
2dfb338133
@ -167,3 +167,4 @@ EMAIL_HOST = os.getenv('EMAIL_HOST', 'smtp')
|
||||
EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER', None)
|
||||
EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD', None)
|
||||
EMAIL_PORT = os.getenv('EMAIL_PORT', '25')
|
||||
EMAIL_FROM = os.getenv('EMAIL_FROM', 'noreply@later42.com')
|
||||
|
@ -5,6 +5,7 @@ from django.template.loader import render_to_string
|
||||
from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode
|
||||
from django.utils.encoding import force_bytes, force_text
|
||||
from django.core.mail import EmailMessage
|
||||
from django.conf import settings
|
||||
from later42.forms import SignUpForm
|
||||
from later42.tokens import account_activation_token
|
||||
|
||||
@ -33,7 +34,8 @@ def register(request):
|
||||
})
|
||||
to_email = form.cleaned_data.get('email')
|
||||
email = EmailMessage(
|
||||
mail_subject, message, to=[to_email]
|
||||
mail_subject, message, to=[
|
||||
to_email], from_email=settings.EMAIL_FROM
|
||||
)
|
||||
email.send()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user