X-Note: Known-Viruses-Found: Unknown Virus

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

X-Note: Known-Viruses-Found: Unknown Virus

Post by hawleyjr »

This really concerns me. We have an application that sends out emails to customers. I got the following returned message. What I don't understand is what I found in the email log. The email I sent doesn't even contain an attachment just some HTML. Does anyone know what their server is kicking this back to me with the virus note?

X-Note: Known-Viruses-Found: Unknown Virus

Code: Select all

Final-Recipient: rfc822;joeemail@mail.com
Action: failed
Status: 5.1.1

--=_MXL-r167BEEAB-t412CA347
Content-Type: message/rfc822

Received: from server45.appriver.com (ї69.20.60.122]) by ace-exchange.domain with Microsoft SMTPSVC(5.0.2195.5329);
	 Wed, 25 Aug 2004 10:34:27 -0400
Received: from ї69.20.58.231] (HELO server50.appriver.com)
  by server45.appriver.com (CommuniGate Pro SMTP 4.2b3)
  with ESMTP id 62865513 for joeemail@mail.com; Wed, 25 Aug 2004 10:30:54 -0400
Received: from mail09c.bellsouth-hosting.net ї209.130.32.2] by server50.appriver.com
  (SMTPD32-8.12) id A36E1F390120; Wed, 25 Aug 2004 10:34:22 -0400
Received: from www913.bellsouth-hosting.net (209.130.32.151)
	by mail09c.bellsouth-hosting.net (RS ver 1.0.94vs) with SMTP id 5-0235444463
	for <joeemail@mail.com>; Wed, 25 Aug 2004 10:34:23 -0400 (EDT)
Received: (from ifgwo1@localhost)
	by www913.bellsouth-hosting.net (SGI-8.12.5/8.12.5/Submit) id i7PEYM6j5637916;
	Wed, 25 Aug 2004 10:34:22 -0400 (EDT)
Date: Wed, 25 Aug 2004 10:34:22 -0400 (EDT)
Message-Id: <200408251434.i7PEYM6j5637916@www913.bellsouth-hosting.net>
To: joeemail@mail.com
Subject: Account reminder
From: auto@hawleyjr.com
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary = 9ca068e57369ce4b63c6dc770af27df0
X-Loop-Detect:1
X-RBL-Warning: BASE64: A binary encoded text or HTML section was found in this E-mail.
&#1111;b]X-Note: Known-Viruses-Found: Unknown Virus&#1111;/b]
X-Note: Spam-Tests-Failed: BASE64
X-Note-WHTLIST: ifgwo1@www913.bellsouth-hosting.net
X-Note-Reverse-DNS: mail09c.bellsouth-hosting.net
X-Note-Sending-IP: 209.130.32.2
X-Country-Path: UNITED STATES->destination
Return-Path: ifgwo1@www913.bellsouth-hosting.net
X-OriginalArrivalTime: 25 Aug 2004 14:34:27.0476 (UTC) FILETIME=&#1111;9FE63D40:01C48AB0]

This is a MIME encoded message.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

maybe the server doesn't accept HTML emails?

how did you attach the HTML?
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Here is my mail function:

Code: Select all

<?php
function send_mail($to,$to_name,$cc,$cc_name,$bcc,$bcc_name,$from,$from_name,$subject,$plain_Text_message,$HTML_Message){
	
	//echo '<PRE>'; print_r(func_get_args()); echo '</PRE>';
	//TO AND FROM ARE THE ONLY REQUIRED FIELDS
		$a_invalid_email_send_mail = array();
		
	if(trim($to)=='' or !isset($to) or is_null($to) or !is_email_valid($to,FALSE)){
		$a_invalid_email_send_mail[INVALID_EMAIL_1] = 'to';
	}
	if(trim($from)=='' or !isset($from) or is_null($from) or !is_email_valid($from,FALSE)){
		$a_invalid_email_send_mail[INVALID_EMAIL_2] = 'from';
	}
	if(!is_email_valid($cc,TRUE)){
		$a_invalid_email_send_mail[INVALID_EMAIL_3] = 'cc';
	}
	if(!is_email_valid($bcc,TRUE)){
		$a_invalid_email_send_mail[INVALID_EMAIL_4] = 'bcc';
	}
	
	
	if(count($a_invalid_email_send_mail)>0)
		return 	$a_invalid_email_send_mail;
	else
		unset($a_invalid_email_send_mail);	
	

	//add From: header 
	$headers = "From: $from\r\n"; 
	$headers .= "Cc: $cc\r\n";
	$headers .= "Bcc: $cc\r\n";
	$headers .= "Reply-To: $from\r\n";
	
	//specify MIME version 1.0 
	$headers .= "MIME-Version: 1.0\r\n"; 
	
	//unique boundary 
	$boundary = md5(uniqid(rand(), true)); 
	
	//tell e-mail client this e-mail contains//alternate versions 
	$headers .= "Content-Type: multipart/alternative" . 
	   "; boundary = $boundary\r\n\r\n"; 
	
	//message to people with clients who don't 
	//understand MIME 
	$headers .= "This is a MIME encoded message.\r\n\r\n"; 
	
	//plain text version of message 
	$headers .= "--$boundary\r\n" . 
	   "Content-Type: text/plain; charset=ISO-8859-1\r\n" . 
	   "Content-Transfer-Encoding: base64\r\n\r\n"; 
	$headers .= chunk_split(base64_encode($plain_Text_message)); 
	
	//HTML version of message 
	$headers .= "--$boundary\r\n" . 
	   "Content-Type: text/html; charset=ISO-8859-1\r\n" . 
	   "Content-Transfer-Encoding: base64\r\n\r\n"; 
	$headers .= chunk_split(base64_encode($HTML_Message)); 
			
	//send message 
	$mail_status = mail($to, $subject, "", $headers); 
		
	return $mail_status;
		
}
?>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'd say they didn't like the base64'd data.. that technically is an attachment, IIRC.
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

What is a better way to encode it?
Post Reply