$bcc = parseAddrs($b);
$body = stripslashes($body);
$from_addr = "$username@$domain";
- $reply_to = getPref($username, "reply_to");
- $from = getPref($username, "full_name");
+ $reply_to = getPref($data_dir, $username, "reply_to");
+ $from = getPref($data_dir, $username, "full_name");
+
if ($from == "")
$from = "<$from_addr>";
else
$from = $from . " <$from_addr>";
-
$smtpConnection = fsockopen($smtpServerAddress, $smtpPort, $errorNumber, $errorString);
if (!$smtpConnection) {
echo "Error connecting to SMTP Server.<br>";
fputs($smtpConnection, "Cc: <$cc_list>\n"); // Who the CCs are
}
fputs($smtpConnection, "X-Mailer: SquirrelMail (version $version)\n"); // Identify SquirrelMail
- fputs($smtpConnection, "Reply-To: $reply_to\n");
fputs($smtpConnection, "MIME-Version: 1.0\n");
fputs($smtpConnection, "Content-Type: text/plain\n");
+ if ($reply_to != "")
+ fputs($smtpConnection, "Reply-To: $reply_to\n");
fputs($smtpConnection, "$body\n"); // send the body of the message