Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Desktop > General Questions

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-05-2012, 04:17 PM
Intermediate Member
 
Posts: 22
Default Zimbra PHP Mail

I am trying to setup a MIME email system and I had it sending mail perfectly just with errors. I have made some switches and now it sends with no errors but is being caught by spam filters.

-Outlook adds the HTML message as an attachment thus placing it in spam..
-School account said it was not sent my the correct user (it was sending it as www.data but I add -f to fix it and now its being caught).
-Seems to go fine to gmail and yahoo...

Here are the headers from outlook that got the message as plain text but added the HTML as an attachment;

Microsoft Mail Internet Headers Version 2.0
Received: from VA10PWPEXC004.us.ad.xxx ([30.128.193.xxx]) by VAPWVBE016.us.ad.xxx with Microsoft SMTPSVC(6.0.3790.4675);
Thu, 5 Jan 2012 16:07:30 -0500
Received: from vaplpmr007.xxx ([198.22.82.xxx]) by VA10PWPEXC004.us.ad.xxx with Microsoft SMTPSVC(6.0.3790.4675);
Thu, 5 Jan 2012 16:07:30 -0500
Received: from vaplpmr007.xxx (vaplpmr007 [127.0.0.1])
by localhost (Postfix) with SMTP id C417B950039
for <xxxxxx>; Thu, 5 Jan 2012 16:07:32 -0500 (EST)
Received: from xxx (rrcs-24-172-204-102.central.biz.rr [24.172.204.xxx])
by vaplpmr007.xxx (Postfix) with ESMTP id 5F03F95000E
for <xxxxxx>; Thu, 5 Jan 2012 16:07:32 -0500 (EST)
Received: from localhost (localhost.localdomain [127.0.0.1])
by xxxxxx (Postfix) with ESMTP id 2EA211F20A8
for <xxxxxx>; Thu, 5 Jan 2012 16:08:09 -0500 (EST)
X-Virus-Scanned: amavisd-new at xxx
Received: from xxx ([127.0.0.1])
by localhost (xxx [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id DBLGJ4qaQ2I7 for <xxxxxx>;
Thu, 5 Jan 2012 16:08:08 -0500 (EST)
Received: by xxx (Postfix, from userid 33)
id 8E3FD1F20A9; Thu, 5 Jan 2012 16:08:08 -0500 (EST)
ToXxx: See forum rules)
Subject: xxx
X-PHP-Originating-Script: 0:MarketEmail2xxx
From:xxxxxx
Reply-To:xxxxxx
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary = xxxmarket4f0611387fca0
Message-Id: <20120105210808.8E3FD1F20A9xxx>
Date: Thu, 5 Jan 2012 16:08:08 -0500 (EST)
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.1.5.210028
Return-PathXxx: See forum rules)
X-OriginalArrivalTime: 05 Jan 2012 21:07:30.0453 (UTC) FILETIME=[093CB450:01CCCBEE]

--xxxmarket4f0611387fca0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: base64

--xxxmarket4f0611387fca0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: base64


--xxxmarket4f0611387fca0--


Here is a look at my actual header setup;

//add From: header
$headers = 'From:' . $from . "\n";
$headers .= 'Reply-To:' . $from . "\n";
$headers .= 'Return-Path:' . $from . "\n";

//specify MIME version 1.0
$headers .= "MIME-Version: 1.0\n";

//unique boundary
$boundary = uniqid("xxxmarket");

//tell e-mail client this e-mail contains//alternate versions
$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";


//plain text version of message
$body = "--$boundary\r\n" .
"Content-Type: text/plain; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
//adds the remove me displaying email address
$urlplain = " http:/"."/xxx/x.php?i=" . $to1[$i];
$plainremove = $urlplain;
//Counts the length
$plaindumplength = strlen($plainremove);
//adds the remove to the string
$plaintxt .= $plainremove;
$body .= chunk_split(base64_encode($plaintxt));

//HTML version of message
$body .= "--$boundary\r\n" .
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
"Content-Transfer-Encoding: base64\r\n\r\n";
//adds on the remove me displaying email address and link to php p$
$urltest = " http:/" . "/xxx/removeme?remove=" . $to1[$i];
$emaildump = "<p> This email was sent to " . $to1[$i] . " if you would like to $
//Counts the length
$dumplength = strlen($emaildump);
//adds the remove to the string
$htmltxt .= $emaildump;
$body .= chunk_split(base64_encode($htmltxt));
$body .= "--$boundary--";


Then the mail;
mail($to1[$i], $subject, $message, $headers, "-f $from"

);
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.