#32633: send_mail must make `from_email` argument optional
------------------------------------------------+------------------------
               Reporter:  aryan340              |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Core (Mail)           |        Version:  3.2
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  0
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 the django docs state that, while sending mail, if no from_email is
 passed, it will use the `DEFAULT_FROM_EMAIL`.
 source: https://docs.djangoproject.com/en/3.1/topics/email/
 > **from_email**: A string. If None, Django will use the value of the
 DEFAULT_FROM_EMAIL setting.

 However, when using the send_mail function, the `from_email` argument is
 not optional.
 A workaround for this right now is this.


 {{{
         send_mail(
             subject=subject,
             message=message,
             recipient_list=[self.user.email],
             from_email=None
          )
 }}}

 giving a default value of `None` to it will resolve this issue.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32633>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.4bc01d6c0cd3abb362462fbea0d57c68%40djangoproject.com.

Reply via email to