Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

RFC822 format e-mails and PHP

Thread Tools
 
Search this Thread
 
Old 11 March 2003, 12:12 AM
  #1  
Dave G
Scooby Regular
Thread Starter
 
Dave G's Avatar
 
Join Date: Jan 2000
Posts: 48
Likes: 0
Received 0 Likes on 0 Posts
Post

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);
}
Old 11 March 2003, 12:17 PM
  #2  
BoxerFlat4
Scooby Regular
 
BoxerFlat4's Avatar
 
Join Date: Nov 2001
Location: N Wales
Posts: 923
Received 0 Likes on 0 Posts
Post

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 ?


Old 11 March 2003, 02:47 PM
  #3  
BoxerFlat4
Scooby Regular
 
BoxerFlat4's Avatar
 
Join Date: Nov 2001
Location: N Wales
Posts: 923
Received 0 Likes on 0 Posts
Post

S'ok, found the problem - thought PHP was stripping out my line returns, and it wasn't. Grr...
Old 03 October 2003, 08:22 PM
  #4  
BoxerFlat4
Scooby Regular
 
BoxerFlat4's Avatar
 
Join Date: Nov 2001
Location: N Wales
Posts: 923
Received 0 Likes on 0 Posts
Question

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]




All times are GMT +1. The time now is 01:14 AM.