@@ -58,18 +58,18 @@ public function sendMail($template, $aData, $throttle=false) {
5858 if ($ transport_type == 'sendmail ' ) {
5959 $ transport = Swift_SendmailTransport::newInstance ($ this ->config ['swiftmailer ' ][$ transport_type ]['path ' ] . ' ' . $ this ->config ['swiftmailer ' ][$ transport_type ]['options ' ]);
6060 } else if ($ this ->config ['swiftmailer ' ]['type ' ] == 'smtp ' ) {
61- $ transport = Swift_SmtpTransport::newInstance ($ this ->config ['switfmailer ' ]['smtp ' ]['host ' ], $ this ->config ['switfmailer ' ]['smtp ' ]['port ' ], $ this ->config ['switfmailer ' ]['smtp ' ]['encryption ' ]);
62- if (!empty ($ this ->config ['switfmailer ' ]['smtp ' ]['username ' ]) && !empty ($ this ->config ['switfmailer ' ]['smtp ' ]['password ' ])) {
63- $ transport ->setUsername ($ this ->config ['switfmailer ' ]['smtp ' ]['username ' ]);
64- $ transport ->setPassword ($ this ->config ['switfmailer ' ]['smtp ' ]['password ' ]);
61+ $ transport = Swift_SmtpTransport::newInstance ($ this ->config ['swiftmailer ' ]['smtp ' ]['host ' ], $ this ->config ['swiftmailer ' ]['smtp ' ]['port ' ], $ this ->config ['swiftmailer ' ]['smtp ' ]['encryption ' ]);
62+ if (!empty ($ this ->config ['swiftmailer ' ]['smtp ' ]['username ' ]) && !empty ($ this ->config ['swiftmailer ' ]['smtp ' ]['password ' ])) {
63+ $ transport ->setUsername ($ this ->config ['swiftmailer ' ]['smtp ' ]['username ' ]);
64+ $ transport ->setPassword ($ this ->config ['swiftmailer ' ]['smtp ' ]['password ' ]);
6565 }
6666 }
6767 $ mailer = Swift_Mailer::newInstance ($ transport );
6868
6969 // Throttle mails to x per minute, used for newsletter for example
7070 if ($ this ->config ['swiftmailer ' ]['type ' ] == 'smtp ' && $ throttle ) {
7171 $ mailer ->registerPlugin (new Swift_Plugins_ThrottlerPlugin (
72- $ this ->config ['switfmailer ' ]['smtp ' ]['throttle ' ], Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE
72+ $ this ->config ['swiftmailer ' ]['smtp ' ]['throttle ' ], Swift_Plugins_ThrottlerPlugin::MESSAGES_PER_MINUTE
7373 ));
7474 }
7575
0 commit comments