]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'chriscase-master'
authorFriendika <info@friendika.com>
Thu, 17 Feb 2011 22:05:51 +0000 (14:05 -0800)
committerFriendika <info@friendika.com>
Thu, 17 Feb 2011 22:05:51 +0000 (14:05 -0800)
Conflicts:
mod/dfrn_notify.php

1  2 
mod/dfrn_notify.php

index b8d86ad249081c29fa4f7b3af82234c7a4c1923a,9397cfaf92b104447b5b1baf3a854bff726b0c6f..180a8edfd398b69551d910f88230ebfb959446f3
@@@ -238,25 -238,24 +238,21 @@@ function dfrn_notify_post(&$a) 
                                '$mimeboundary' => $msg['mimeboundary'],                                // mime message divider
                                '$hostname'             => $a->get_hostname()                                   // name of this host
                        ));
-                       
-                       // load the template for private message notifications
-                       $tpl = load_view_file('view/mail_received_eml.tpl');
-                       
-                       // import the data into the template                    
-                       $email_tpl = replace_macros($tpl, array(
-                               '$siteurl'              => $a->get_baseurl(),                                   // descriptive url of this site
-                               '$email'                => $importer['email'],                                  // email address to send to
-                               '$from'                 => $msg['from-name'],                                   // name of the person sending the message
-                               '$title'                => stripslashes($msg['title']),                 // subject of the message
-                               '$mimeboundary' => $msg['mimeboundary'],                                // mime message divider
-                               '$hostname'             => $a->get_hostname(),                                  // name of this host
-                               '$htmlbody'             => chunk_split(base64_encode($email_html_body_tpl)),
-                               '$textbody'             => chunk_split(base64_encode($email_text_body_tpl))
-                       ));
-                       
-                       logger("message headers: " . $msg['headers']);
-                       logger("message body: " . $mail_tpl);
+                       // assemble the final multipart message body with the text and html types included
+                       $textbody       =       chunk_split(base64_encode($email_text_body_tpl));
+                       $htmlbody       =       chunk_split(base64_encode($email_html_body_tpl));
+                       $multipart_message_body =
+                               "--" . $msg['mimeboundary'] . "\n" .                                    // plain text section
+                               "Content-Type: text/plain; charset=UTF-8\n" .
+                               "Content-Transfer-Encoding: base64\n\n" .
+                               $textbody . "\n" .
+                               "--" . $msg['mimeboundary'] . "\n" .                                    // text/html section
+                               "Content-Type: text/html; charset=UTF-8\n" .
+                               "Content-Transfer-Encoding: base64\n\n" .
+                               $htmlbody . "\n" .
+                               "--" . $msg['mimeboundary'] . "--\n";                                   // message ending
                        
 -                      logger("message headers: " . $msg['headers']);
 -                      logger("message body: " . $mail_tpl);
 -                      
                        
                        // send the message
                        $res = mail(