diff -u -u hastymail-1.5/lib/session.php hastymail-1.5-patched/lib/session.php --- hastymail-1.5/lib/session.php 2006-10-08 17:19:58.000000000 -0500 +++ hastymail-1.5-patched/lib/session.php 2006-10-08 17:22:52.000000000 -0500 @@ -66,7 +66,7 @@ } break; case 'folder': - $checked[$key] = (string) $value; + $checked[$key] = (string) (str_replace(array("\n", "\r"), '', $value)); break; case 'int': $checked[$key] = (int) intval($value); diff -u -u hastymail-1.5/lib/smtp.php hastymail-1.5-patched/lib/smtp.php --- hastymail-1.5/lib/smtp.php 2006-10-08 17:18:31.000000000 -0500 +++ hastymail-1.5-patched/lib/smtp.php 2006-10-08 17:22:52.000000000 -0500 @@ -352,6 +352,7 @@ $smtp_message .= 'x-priority: '.$priority."\r\n"; } $smtp_message .= "MIME-Version: 1.0\r\n"; + $smtp_message = preg_replace("/^\.\r\n/", "..\r\n", $smtp_message); $size = 0; $bndry = '';