Changeset 1725268
- Timestamp:
- 09/05/2017 11:37:13 PM (9 years ago)
- Location:
- cimy-swift-smtp/trunk
- Files:
-
- 3 edited
-
README_OFFICIAL.txt (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
swift_engine.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cimy-swift-smtp/trunk/README_OFFICIAL.txt
r1723464 r1725268 62 62 63 63 CHANGELOG: 64 v3.0.1 - 06/09/2017 65 - Fixed PHP Parse error regression on older PHP 5.x (despite they are now unsupported, thanks to Andrew Bruce) 66 64 67 v3.0.0 - 02/09/2017 65 68 - Updated Swift Mailer to 6.0.1 (dropped support for PHP <=5.x and WordPress <= 3.x) -
cimy-swift-smtp/trunk/readme.txt
r1723464 r1725268 6 6 Requires at least: 4.0 7 7 Tested up to: 4.8 8 Stable tag: 3.0. 08 Stable tag: 3.0.1 9 9 10 10 Send email via SMTP (Compatible with GMAIL) -
cimy-swift-smtp/trunk/swift_engine.php
r1723422 r1725268 170 170 } 171 171 172 // Create a message173 $ message = (new Swift_Message($subject))172 // Create a message 173 $swift_message = (new Swift_Message($subject)) 174 174 ->setFrom(array(apply_filters('wp_mail_from', $from_email) => apply_filters('wp_mail_from_name', $from_name))) 175 175 ->setBody($message) … … 178 178 // Set the sender, which may be different than the from field 179 179 if (!empty($sender_email)) { 180 $ message->setSender(array($sender_email => $sender_name));180 $swift_message->setSender(array($sender_email => $sender_name)); 181 181 } 182 182 183 183 // Set the reply-to 184 184 if (!empty($reply_to)) { 185 $ message->setReplyTo($reply_to);185 $swift_message->setReplyTo($reply_to); 186 186 } 187 187 … … 201 201 // leave the name null if empty 202 202 if (empty($recipient_name)) { 203 $ message->addTo(trim($recipient));203 $swift_message->addTo(trim($recipient)); 204 204 } 205 205 else { 206 $ message->addTo(trim($recipient), $recipient_name);206 $swift_message->addTo(trim($recipient), $recipient_name); 207 207 } 208 208 … … 222 222 // leave the name null if empty 223 223 if (empty($recipient_name)) { 224 $ message->addCc(trim($recipient));224 $swift_message->addCc(trim($recipient)); 225 225 } 226 226 else { 227 $ message->addCc(trim($recipient), $recipient_name);227 $swift_message->addCc(trim($recipient), $recipient_name); 228 228 } 229 229 } … … 242 242 // leave the name null if empty 243 243 if (empty($recipient_name)) { 244 $ message->addBcc(trim($recipient));244 $swift_message->addBcc(trim($recipient)); 245 245 } 246 246 else { 247 $ message->addBcc(trim($recipient), $recipient_name);247 $swift_message->addBcc(trim($recipient), $recipient_name); 248 248 } 249 249 } … … 257 257 $content_type = apply_filters('wp_mail_content_type', $content_type); 258 258 259 $ message->setContentType($content_type);259 $swift_message->setContentType($content_type); 260 260 261 261 // If we don't have a charset from the input headers … … 268 268 // Set custom headers 269 269 if ( !empty( $headers ) ) { 270 $msg_headers = $ message->getHeaders();270 $msg_headers = $swift_message->getHeaders(); 271 271 272 272 foreach((array) $headers as $name => $content) { … … 286 286 continue; 287 287 try { 288 $ message->attach(Swift_Attachment::fromPath($attachment));288 $swift_message->attach(Swift_Attachment::fromPath($attachment)); 289 289 } catch (Swift_IoException $e) { 290 290 continue; … … 319 319 320 320 // Send! 321 $result = $mailer->send($ message, $failures);321 $result = $mailer->send($swift_message, $failures); 322 322 } 323 323 catch (Exception $e) {
Note: See TracChangeset
for help on using the changeset viewer.