RFC822 format e-mails and PHP
#1
Boxer
Sounds like you are using Titan
Make sure you terminate all your SMTP headers when you form your mail with \r\n
Or try something like this:
function SEND_HTML_MAIL($mail_info) {
$from_name = $mail_info["from_name"];
$from_address = $mail_info["from_address"];
$to_name = $mail_info["to_name"];
$to_address = $mail_info["to_name"]." <".$mail_info["to_address"].">";
$message = $mail_info["message"];
$subject = $mail_info["subject"];
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$from_name." <".$from_address.">\r\n";
$headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
mail($to_address, $subject, $message, $headers);
}
Sounds like you are using Titan
Make sure you terminate all your SMTP headers when you form your mail with \r\n
Or try something like this:
function SEND_HTML_MAIL($mail_info) {
$from_name = $mail_info["from_name"];
$from_address = $mail_info["from_address"];
$to_name = $mail_info["to_name"];
$to_address = $mail_info["to_name"]." <".$mail_info["to_address"].">";
$message = $mail_info["message"];
$subject = $mail_info["subject"];
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: ".$from_name." <".$from_address.">\r\n";
$headers .= "Reply-To: ".$from_name." <".$from_address.">\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: iCEx Networks HTML-Mailer v1.0";
mail($to_address, $subject, $message, $headers);
}
#2
Scooby Regular
Dave G -
Yeah, your right, I am using Titan - can you see any issues with the test message below :-
Date: Tue, 11 Mar 03 12:15:22
From: "Paul Houbart" <Shop@TheGecko.biz>
To: "Paul Houbart" <Paul.Houbart@TheGecko.biz>
Subject: Welcome to Gecko Motorsport
MIME-Version: 1.0
X-Mailer: osCommerce Mailer
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Test message
.
This won't pass the filter, and yet I'm positive all line returns are CRLF. Any ideas ?
Yeah, your right, I am using Titan - can you see any issues with the test message below :-
Date: Tue, 11 Mar 03 12:15:22
From: "Paul Houbart" <Shop@TheGecko.biz>
To: "Paul Houbart" <Paul.Houbart@TheGecko.biz>
Subject: Welcome to Gecko Motorsport
MIME-Version: 1.0
X-Mailer: osCommerce Mailer
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Test message
.
This won't pass the filter, and yet I'm positive all line returns are CRLF. Any ideas ?
#4
Scooby Regular
OK, I've got a PHP web shop which I'm setting up, which at various points spits out e-mails to customers, admin etc etc. Now, my host has recently installed an e-mail filter on the server, which means that I need to get my e-mail into a RFC822-friendly format, or else it won't get sent out.
Does anyone know of a php class that can process my text, headers etc etc, and spit out a properly formatted e-mail for me ? Driving me mad trying to figure out why my modifications are failing to pass the filter, even though I seem to have a RFC822 frmat e-mail, it still fails the filter.
[Edited by BoxerFlat4 - 3/10/2003 8:22:41 PM]
Does anyone know of a php class that can process my text, headers etc etc, and spit out a properly formatted e-mail for me ? Driving me mad trying to figure out why my modifications are failing to pass the filter, even though I seem to have a RFC822 frmat e-mail, it still fails the filter.
[Edited by BoxerFlat4 - 3/10/2003 8:22:41 PM]