選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

90 行
2.5KB

  1. Installing the Library
  2. ======================
  3. Installing with Composer
  4. ------------------------
  5. The recommended way to install Swiftmailer is via Composer:
  6. .. code-block:: bash
  7. $ php composer.phar require swiftmailer/swiftmailer @stable
  8. Installing from Git
  9. -------------------
  10. It's possible to download and install Swift Mailer directly from github.com if
  11. you want to keep up-to-date with ease.
  12. Swift Mailer's source code is kept in a git repository at github.com so you
  13. can get the source directly from the repository.
  14. .. note::
  15. You do not need to have git installed to use Swift Mailer from GitHub. If
  16. you don't have git installed, go to `GitHub`_ and click the "Download"
  17. button.
  18. Cloning the Repository
  19. ~~~~~~~~~~~~~~~~~~~~~~
  20. The repository can be cloned from git://github.com/swiftmailer/swiftmailer.git
  21. using the ``git clone`` command.
  22. You will need to have ``git`` installed before you can use the
  23. ``git clone`` command.
  24. To clone the repository:
  25. * Open your favorite terminal environment (command line).
  26. * Move to the directory you want to clone to.
  27. * Run the command ``git clone git://github.com/swiftmailer/swiftmailer.git
  28. swiftmailer``.
  29. The source code will be downloaded into a directory called "swiftmailer".
  30. The example shows the process on a UNIX-like system such as Linux, BSD or Mac
  31. OS X.
  32. .. code-block:: bash
  33. $ cd source_code/
  34. $ git clone git://github.com/swiftmailer/swiftmailer.git swiftmailer
  35. Initialized empty Git repository in /Users/chris/source_code/swiftmailer/.git/
  36. remote: Counting objects: 6815, done.
  37. remote: Compressing objects: 100% (2761/2761), done.
  38. remote: Total 6815 (delta 3641), reused 6326 (delta 3286)
  39. Receiving objects: 100% (6815/6815), 4.35 MiB | 162 KiB/s, done.
  40. Resolving deltas: 100% (3641/3641), done.
  41. Checking out files: 100% (1847/1847), done.
  42. $ cd swiftmailer/
  43. $ ls
  44. CHANGES LICENSE ...
  45. $
  46. Troubleshooting
  47. ---------------
  48. Swift Mailer does not work when used with function overloading as implemented
  49. by ``mbstring`` (``mbstring.func_overload`` set to ``2``). A workaround is to
  50. temporarily change the internal encoding to ``ASCII`` when sending an email:
  51. .. code-block:: php
  52. if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2)
  53. {
  54. $mbEncoding = mb_internal_encoding();
  55. mb_internal_encoding('ASCII');
  56. }
  57. // Create your message and send it with Swift Mailer
  58. if (isset($mbEncoding))
  59. {
  60. mb_internal_encoding($mbEncoding);
  61. }
  62. .. _`GitHub`: http://github.com/swiftmailer/swiftmailer