How does Swiftmailer handle email addresses with special characters like umlauts?

Swiftmailer handles email addresses with special characters like umlauts by encoding them using UTF-8. This ensures that the email addresses are properly formatted and can be sent without any issues.

// Create the Transport
$transport = new Swift_SmtpTransport('smtp.example.com', 25);

// Create the Mailer using your created Transport
$mailer = new Swift_Mailer($transport);

// Create a message
$message = new Swift_Message('Wonderful Subject');
$message->setFrom(['john.doe@example.com' => 'John Doe']);
$message->setTo(['receiver@example.com' => 'Receiver']);
$message->setBody('Here is the message body.');

// Send the message
$result = $mailer->send($message);