Setting up email functionality in Django involves configuring the email backend and creating views and forms for email sending. You can use Django's built-in EmailMessage class to compose and send emails. Here is a basic example:
# views.py from django.core.mail import send_mail from django.http import HttpResponse
def send_email(request): subject = 'Welcome to My Site' message = 'Thank you for signing up for our newsletter!' from_email = 'your-email@example.com' recipient_list = ['recipient@example.com'] send_mail(subject, message, from_email, recipient_list) return HttpResponse('Email sent successfully')