Changeset 2682 for trunk/system/helpers/email.php
- Timestamp:
- 05/21/2008 09:18:46 AM (6 months ago)
- Files:
-
- 1 modified
-
trunk/system/helpers/email.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
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
