added attachment support
[squirrelmail.git] / functions / smtp.php
index d2865becb245b03838dfd7ff7000154994664066..6241c02f0cf5a08abdc75a26e8edf87c31a47b97 100644 (file)
@@ -20,7 +20,7 @@
       $to = parseAddrs($t);
       $cc = parseAddrs($c);
       $bcc = parseAddrs($b);
-      $body = $body;
+      $body = stripslashes($body);
       $from = "$username@$domain";
 
       echo "<FONT FACE=\"Arial,Helvetica\">";
       /** Lets start sending the actual message */
       fputs($smtpConnection, "DATA\n");
       fputs($smtpConnection, "Subject: $subject\n"); // Subject
+      fputs($smtpConnection, "From: <$from>\n"); // Subject
       fputs($smtpConnection, "To: <$to_list>\n");    // Who it's TO
       if ($cc_list) {
          fputs($smtpConnection, "Cc: <$cc_list>\n"); // Who the CCs are
       }
       fputs($smtpConnection, "X-Mailer: SquirrelMail (version $version)\n"); // Identify SquirrelMail
+      fputs($smtpConnection, "Reply-To: $from\n");
+      fputs($smtpConnection, "MIME-Version: 1.0\n");
+      fputs($smtpConnection, "Content-Type: text\n");
 
       fputs($smtpConnection, "$body\n"); // send the body of the message
       fputs($smtpConnection, ".\n"); // end the DATA part