return the result of mail() as result of send()
[php-utility-classes.git] / include / classes / email.php-class
index 77d4033822e9280051e6a3f6f07ae8bffea55ec1..9b3614b203595647d5d643d242c9fe597fb40ec5 100755 (executable)
@@ -96,6 +96,9 @@ class email {
   // function addMailText($textpart)
   //   add some text to the mail
   //
   // function addMailText($textpart)
   //   add some text to the mail
   //
+  // function addAttachment($aname, $acontent, [$atype])
+  //   add an attachment to the mail, use given file name, content and MIME type (defaults to application/octet-stream)
+  //
   // function send()
   //   really send the mail
   //
   // function send()
   //   really send the mail
   //
@@ -250,7 +253,7 @@ class email {
     //print("To: ".$util->htmlify($recpt)."<br>\n");
     //print(nl2br($util->htmlify($hdrs)));
     //print(nl2br($util->htmlify($mtxt)));
     //print("To: ".$util->htmlify($recpt)."<br>\n");
     //print(nl2br($util->htmlify($hdrs)));
     //print(nl2br($util->htmlify($mtxt)));
-    mail($recpt, $subj, $mtxt, $hdrs);
+    return mail($recpt, $subj, $mtxt, $hdrs);
   }
 
   function mimeencode($fieldtext) {
   }
 
   function mimeencode($fieldtext) {