'Regression test for #14301'

def test_idn_send(self):

    self.assertTrue(send_mail('Subject', 'Content', 'from@\xc3\xb6\xc3\xa4\xc3\xbc.com', [u'to@\xf6\xe4\xfc.com']))
    message = self.get_the_message()
    self.assertEqual(message.get('subject'), 'Subject')
    self.assertEqual(message.get('from'), 'from@xn--4ca9at.com')
    self.assertEqual(message.get('to'), 'to@xn--4ca9at.com')
    self.flush_mailbox()
    m = EmailMessage('Subject', 'Content', 'from@\xc3\xb6\xc3\xa4\xc3\xbc.com', [u'to@\xf6\xe4\xfc.com'])
    m.send()
    message = self.get_the_message()
    self.assertEqual(message.get('subject'), 'Subject')
    self.assertEqual(message.get('from'), 'from@xn--4ca9at.com')
    self.assertEqual(message.get('to'), 'to@xn--4ca9at.com')
