Anyways, the system I built was a custom clone of the popular MailMan Mailing list system. It uses PHP5, MySQL, and cron. There is a custom class the grabs the emails sent to a specific address on a POP3 server and inserts the raw data into the database. It also parses the raw data and splits out all mail parts including attachments (it saves the attachments to the server filesystem outside the web root). The message is placed in a queue that waits for moderator approval of the message. The cron job I have checks for approved messages and re-constructs the message using Swift_Message_Part, Swift_Message_EmbeddedFile, and Swift_Message_Attachment.
The system works excellent (it's been able to send crazy emails with various message parts and files attached), but every once in a while a message gets sent that is truncated always where a period should but it must also crash the script because it never gets marked as complete and those signed up to receive the email never see it.
I know there was another thread here where someone was having the same issues but I don't think it was ever resolved. It would be great if I could fix this so I won't always have to be worried about an email getting jammed in the queue.
Here is an example:
Originally Sent Message
Code: Select all
Delivered-To: announcements@example.com
Received: by 10.100.47.16 with SMTP id u16cs359500anu; Thu, 28 Jun 2007 10:32:40 -0700 (PDT)
Received: by 10.100.140.6 with SMTP id n6mr1411312and.1183051960223; Thu, 28 Jun 2007 10:32:40 -0700 (PDT)
Return-Path: <user@example.com>
Received: from alnrmhc15.comcast.net (alnrmhc15.comcast.net [204.127.225.95]) by mx.google.com with ESMTP id c9si11689731ana.2007.06.28.10.32.39; Thu, 28 Jun 2007 10:32:40 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of user@example.com designates 204.127.225.95 as permitted sender)
Received: from lori1e24eb7a86 (c-XX-XX-XX-XX.hsd1.wa.comcast.net[XX.XX.XX.XX]) by comcast.net (alnrmhc15) with SMTP id <20070628173238b1500cfu0ae>; Thu, 28 Jun 2007 17:32:39 +0000
Reply-To: <user@example.com>
From: "Nolan & Lori Host" <user@example.com>
To: <announcements@example.com>
Subject: Want to Buy - Homeschool Curriculum
Date: Thu, 28 Jun 2007 10:32:39 -0700
Message-ID: <000001c7b9aa$535affc0$6400a8c0@lori1e24eb7a86>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C7B96F.A6FC27C0"
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.6822
Importance: Normal
Thread-Index: Ace5qlLiDzJwq9tHRgiSd/+n1VGwgw==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
This is a multi-part message in MIME format.
------=_NextPart_000_0001_01C7B96F.A6FC27C0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Dear HOFCC Families,
=20
I am having trouble finding a few expensive curriculum items used. So, I
thought I'd check with all of you. I would like to buy the following =
items:
=20
* Teaching Textbooks Pre-Algebra complete set
* Apologia: Exploring Creation with Physical Science - Complete Course
on CD-ROM, Version 8.0
=20
If you have these in nice condition and wish to sell them, I'm =
interested.
=20
Thank you and God's Blessings to you,
Lori Host
------=_NextPart_000_0001_01C7B96F.A6FC27C0
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:Arial;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:.5in 1.0in .55in 1.0in;}
div.Section1
{page:Section1;}
/* List Definitions */
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>Dear
HOFCC Families,</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>I am
having trouble finding a few expensive curriculum items used. So, I =
thought I’d
check with all of you. I would like to buy the following =
items:</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'> </span></font></p>
<ul type=3Ddisc>
<li class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>Teaching
Textbooks Pre-Algebra complete set</span></font></li>
<li class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>Apologia:
Exploring Creation with Physical Science – Complete Course on
CD-ROM, Version 8.0</span></font></li>
</ul>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>If
you have these in nice condition and wish to sell them, I’m =
interested.</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'> </span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>Thank
you and God’s Blessings to you,</span></font></p>
<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt'>Lori
Host</span></font></p>
</div>
</body>
</html>
------=_NextPart_000_0001_01C7B96F.A6FC27C0--Received Message sent using Swift:
Code: Select all
Delivered-To: aedmonds@example.com
Received: by 10.114.209.4 with SMTP id h4cs293458wag;
Thu, 16 Aug 2007 15:50:50 -0700 (PDT)
Received: by 10.115.89.1 with SMTP id r1mr2501710wal.1187304650227;
Thu, 16 Aug 2007 15:50:50 -0700 (PDT)
Return-Path: <mailer@example.com>
Received: from spunkymail-a5.g.dreamhost.com (sd-green-bigip-74.dreamhost.com [208.97.132.74])
by mx.google.com with ESMTP id l36si2006774waf.2007.08.16.15.50.49;
Thu, 16 Aug 2007 15:50:50 -0700 (PDT)
Received-SPF: neutral (google.com: 208.97.132.74 is neither permitted nor denied by best guess record for domain of mailer@example.com) client-ip=208.97.132.74;
Authentication-Results: mx.google.com; spf=neutral (google.com: 208.97.132.74 is neither permitted nor denied by best guess record for domain of mailer@example.com) smtp.mail=mailer@example.com
Received: from SwiftUser (runts.dreamhost.com [208.113.138.13])
by spunkymail-a5.g.dreamhost.com (Postfix) with ESMTP id 4289914D6B1
for <aedmonds@example.com>; Thu, 16 Aug 2007 15:50:47 -0700 (PDT)
To: aedmonds@example.com
From: mailer@example.com
Reply-To: mailer@example.com
Subject: Want to Buy - Homeschool Curriculum
Date: Thu, 16 Aug 2007 15:50:48 -0700
X-Mailer: Swift 3.1.5
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="_=_swift-20906150646c4d4c948cc80.77865094_=_"
Content-Transfer-Encoding: 7bit
Sender: mailer@example.com
Errors-To: mailer@example.com
Message-ID: <2147483647.27010.1906982932.swift@runts>
This is a message in multipart MIME format. Your mail client should not
be displaying this. Consider upgrading your mail client to view this
message correctly.
--_=_swift-20906150646c4d4c948cc80.77865094_=_
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Dear HOFCC Families,
=
=
I am having trouble finding a few expensive curriculum items used. So, I
=
thought I'd check with all of you. I would like to buy the following ite=
ms:
=
=
* Teaching Textbooks Pre-Algebra complete set
* =
Apologia: Exploring Creation with Physical Science - Complete Course
on=
CD-ROM, Version 8.0
=
=
If you have these in nice condition and wish to sell them, I'm interested=Any insight would be appreciated.
-Aaron
EDIT: Oh and I'm using 3.1.5 but I've also tested this using 3.2.5 and 3.2.6.