japanese.rst 676B

1234567891011121314151617181920212223
  1. Using Swift Mailer for Japanese Emails
  2. ======================================
  3. To send emails in Japanese, you need to tweak the default configuration.
  4. After requiring the Swift Mailer autoloader (by including the
  5. ``swift_required.php`` file), call the ``Swift::init()`` method with the
  6. following code::
  7. require_once '/path/to/swift-mailer/lib/swift_required.php';
  8. Swift::init(function () {
  9. Swift_DependencyContainer::getInstance()
  10. ->register('mime.qpheaderencoder')
  11. ->asAliasOf('mime.base64headerencoder');
  12. Swift_Preferences::getInstance()->setCharset('iso-2022-jp');
  13. });
  14. /* rest of code goes here */
  15. That's all!