17 lines
407 B
Python
17 lines
407 B
Python
|
|
from django.core.mail import send_mail
|
|
|
|
def send_test_email():
|
|
subject = 'Test Email from Django'
|
|
message = 'Hello, this is a test email sent from Django!'
|
|
from_email = 'your-email@example.com'
|
|
recipient_list = ['recipient-email@example.com']
|
|
|
|
send_mail(subject, message, from_email, recipient_list)
|
|
print('Email sent successfully!')
|
|
|
|
def run():
|
|
send_test_email()
|
|
|
|
|
|
|