Changeset 2682
- Timestamp:
- 05/21/2008 09:18:46 AM (5 months ago)
- Location:
- trunk/system
- Files:
-
- 2 modified
-
config/email.php (modified) (1 diff)
-
helpers/email.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/config/email.php
r2505 r2682 12 12 13 13 /** 14 * To use secure connections with SMTP, set "port" to 465 instead of 25. 15 * To enable TLS, set "encryption" to "tls". 16 * 14 17 * Driver options: 15 18 * @param null native: no options 16 19 * @param string sendmail: executable path, with -bs or equivalent attached 17 * @param array smtp: hostname, (username), (password), (port), (auth) 20 * @param array smtp: hostname, (username), (password), (port), (auth), (encryption) 18 21 */ 19 22 $config['options'] = NULL; -
trunk/system/helpers/email.php
r2511 r2682 38 38 { 39 39 case 'smtp': 40 // Set port 41 $port = empty($config['options']['port']) ? 25 : (int) $config['options']['port']; 42 43 if (empty($config['options']['encryption'])) 44 { 45 // No encryption 46 $encryption = Swift_Connection_SMTP::ENC_OFF; 47 } 48 else 49 { 50 // Set encryption 51 switch (strtolower($config['options']['encryption'])) 52 { 53 case 'tls': $encryption = Swift_Connection_SMTP::ENC_TLS; break; 54 case 'ssl': $encryption = Swift_Connection_SMTP::ENC_SSL; break; 55 } 56 } 57 40 58 // Create a SMTP connection 41 $connection = new Swift_Connection_SMTP 42 ( 43 $config['options']['hostname'], 44 empty($config['options']['port']) ? 25 : (int) $config['options']['port'] 45 ); 59 $connection = new Swift_Connection_SMTP($config['options']['hostname'], $port, $encryption); 46 60 47 61 // Do authentication, if part of the DSN
