Ticket #12648: patch.diff

File patch.diff, 680 bytes (added by Kamil Gałuszka, 15 years ago)

Patch

  • django/contrib/auth/models.py

     
    305305
    306306    def email_user(self, subject, message, from_email=None):
    307307        "Sends an e-mail to this User."
     308        """
    308309        from django.core.mail import send_mail
    309310        send_mail(subject, message, from_email, [self.email])
    310 
     311        """
     312        from django.core.mail import EmailMessage
     313        email = EmailMessage(subject, message, self.email)
     314        email.send()
     315       
    311316    def get_profile(self):
    312317        """
    313318        Returns site-specific profile for this user. Raises
Back to Top