【Django】Send Mail

setting.py
EMAIL_HOST = ‘domain name’
EMAIL_HOST_PASSWORD = ‘xxxxxxx’
EMAIL_HOST_USER = ‘xxxxxxx’
EMAIL_PORT = 25

 

xxx.py

from django.core.mail import send_mail

send_mail(‘Subject here’, ‘Here is the message.’,’from@mknod.jp’, [‘to@mknod.jp’], fail_silently=False)

 

Leave a Reply