return the result of mail() as result of send()
[php-utility-classes.git] / include / classes / email.php-class
index 9e5adba9a2ba91a53a01bc9b8e371c86492fa36b..9b3614b203595647d5d643d242c9fe597fb40ec5 100755 (executable)
@@ -1,4 +1,24 @@
 <?php
 <?php
+/* ***** BEGIN LICENSE BLOCK *****
+ *
+ * The contents of this file are subject to Austrian copyright reegulations
+ * ("Urheberrecht"); you may not use this file except in compliance with
+ * those laws.
+ * This contents and any derived work, if it gets distributed in any way,
+ * is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
+ * either express or implied.
+ *
+ * The Original Code is KaiRo's E-Mail module.
+ *
+ * The Initial Developer of the Original Code is
+ * KaiRo - Robert Kaiser.
+ * Portions created by the Initial Developer are Copyright (C) 2003-2004
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Robert Kaiser <kairo@kairo.at>
+ *
+ * ***** END LICENSE BLOCK ***** */
+
 class email {
   // email PHP class
   // class/object for creating a new mail and send it
 class email {
   // email PHP class
   // class/object for creating a new mail and send it
@@ -76,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
   //
@@ -230,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) {