This package is abandoned and no longer maintained. The author suggests using the swiftmailer/swiftmailer:^6.1 package instead.

Swiftmailer plugin to convert domain in email addresses to punycode

v1.0.0 2018-01-18 07:26 UTC

This package is auto-updated.

Last update: 2019-02-20 19:29:55 UTC


Build Status

Swiftmailer plugin to convert domain in email addresses to punycode.


composer require ossinkine/swiftmailer-punycode-plugin


Create and register a plugin instance when you setup a Swift_Mailer instance.

use Ossinkine\Swift\Plugin\PunycodePlugin;

// Create the Mailer using any Transport
$mailer = new Swift_Mailer(
  new Swift_SmtpTransport('smtp.example.org', 25)

// Register the plugin
$mailer->registerPlugin(new PunycodePlugin());

Now you can send an email to an address with Unicode-encoded domain.

// Create a message with Unicode-encoded receiver address
$message = (new Swift_Message())
// Send the message

Usage with Symfony

Just register a service with a swiftmailer.default.plugin tag in your services.yml.

    tags: [swiftmailer.default.plugin]


Swiftmailer Punycode Plugin is licensed under the MIT license.