ramakrishna
ramakrishna

Reputation: 13

Multiple emails configurations to send emails (if admin have multiple emails then admin need to choose )in Django using python

sending an email from one email is working fine, but if we want send an email to user from multiple emails(i have 3 emails from that i need to choose any one and receiver get email whichever i chose ) so please help me I'm new to Django and Python

Upvotes: 0

Views: 129

Answers (1)

Lhuckyehm
Lhuckyehm

Reputation: 11

This is how to send multiple email in django.

from django.core.mail import send_mail

send_mail(
    'Subject here',
    'Here is the message.',
    '[email protected]',
    ['[email protected]', '[email protected]'],
    fail_silently=False,
)

Here's the django documentation. https://docs.djangoproject.com/en/2.2/topics/email/

I hope this help. Also beginner in django :)

Upvotes: 1

Related Questions