You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.1KB

  1. <?php
  2. /****************************************************************************/
  3. /* */
  4. /* YOU MAY WISH TO MODIFY OR REMOVE THE FOLLOWING LINES WHICH SET DEFAULTS */
  5. /* */
  6. /****************************************************************************/
  7. $preferences = Swift_Preferences::getInstance();
  8. // Sets the default charset so that setCharset() is not needed elsewhere
  9. $preferences->setCharset('utf-8');
  10. // Without these lines the default caching mechanism is "array" but this uses a lot of memory.
  11. // If possible, use a disk cache to enable attaching large attachments etc.
  12. // You can override the default temporary directory by setting the TMPDIR environment variable.
  13. if (@is_writable($tmpDir = sys_get_temp_dir())) {
  14. $preferences->setTempDir($tmpDir)->setCacheType('disk');
  15. }
  16. // this should only be done when Swiftmailer won't use the native QP content encoder
  17. // see mime_deps.php
  18. if (version_compare(phpversion(), '5.4.7', '<')) {
  19. $preferences->setQPDotEscape(false);
  20. }