PHPMailer - False Positives
PHPMailer - False Positives
am 17.09.2007 15:12:04 von lucanos
Hi All,
I am currently using PHPMailer to send out a set of emails on the
execution of a PHP Script (obviously).
My problem is that the PHPMailer action is returning a "true" result
each time it is executed, but not every email generated by this action
is actually being sent.
My account is hosted on HostMonster, and is pointed at the localhost
as the SMTP server.
I use two email list groups - one has 18 listed recipients (and sends
between 6 and 18 actual emails) and the other has 65 recipients (and
sendd between 7 and 26 emails).
Initially the script created a new object for each email (sending them
out as one email per recipient at the moment), and currently I am
using the same object repeatedly (just changing the To address for
each execution), but the fault was evident in each configuration.
I am monitoring the performance of this script by BCCing a copy to a
dropbox, which is where I am getting the actual email counts from.
Anyone had a similar experience? Anyone seeing any possible fixes
which I cannot currently see?
Thanks
Luke
Re: PHPMailer - False Positives
am 18.09.2007 02:48:10 von Bucky Kaufman
Lucanos wrote:
> Hi All,
>
> I am currently using PHPMailer to send out a set of emails on the
> execution of a PHP Script (obviously).
> My problem is that the PHPMailer action is returning a "true" result
> each time it is executed, but not every email generated by this action
> is actually being sent.
I'm very curious to know why so many folks seem to be using this little
script - PHPMailer.
I mean - the PHP mail() function is *amazingly* simple to use, and I
would think that anything that changes that would make it worse.
What's the attraction?
Re: PHPMailer - False Positives
am 18.09.2007 02:55:10 von Jerry Stuckle
Lucanos wrote:
> Hi All,
>
> I am currently using PHPMailer to send out a set of emails on the
> execution of a PHP Script (obviously).
> My problem is that the PHPMailer action is returning a "true" result
> each time it is executed, but not every email generated by this action
> is actually being sent.
>
> My account is hosted on HostMonster, and is pointed at the localhost
> as the SMTP server.
> I use two email list groups - one has 18 listed recipients (and sends
> between 6 and 18 actual emails) and the other has 65 recipients (and
> sendd between 7 and 26 emails).
>
> Initially the script created a new object for each email (sending them
> out as one email per recipient at the moment), and currently I am
> using the same object repeatedly (just changing the To address for
> each execution), but the fault was evident in each configuration.
>
> I am monitoring the performance of this script by BCCing a copy to a
> dropbox, which is where I am getting the actual email counts from.
>
> Anyone had a similar experience? Anyone seeing any possible fixes
> which I cannot currently see?
>
> Thanks
> Luke
>
All PHPMailer can do is tell if the mail was passed off to the MTA
properly or not. If it is, PHPMailer returns true.
What happens after that is out of PHPMailer's control. There is no
guarantee it will be delivered or not - you need the MTA's logs to see
what's happening after that.
It could be your host has limits on what the MTA will send, for instance.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: PHPMailer - False Positives
am 18.09.2007 12:45:03 von Jerry Stuckle
Sanders Kaufman wrote:
> Lucanos wrote:
>> Hi All,
>>
>> I am currently using PHPMailer to send out a set of emails on the
>> execution of a PHP Script (obviously).
>> My problem is that the PHPMailer action is returning a "true" result
>> each time it is executed, but not every email generated by this action
>> is actually being sent.
>
> I'm very curious to know why so many folks seem to be using this little
> script - PHPMailer.
>
> I mean - the PHP mail() function is *amazingly* simple to use, and I
> would think that anything that changes that would make it worse.
>
> What's the attraction?
You've obviously never tried to send attachments, html, etc. with mail().
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: PHPMailer - False Positives
am 18.09.2007 16:43:13 von Michael Fesser
..oO(Sanders Kaufman)
>I'm very curious to know why so many folks seem to be using this little
>script - PHPMailer.
>
>I mean - the PHP mail() function is *amazingly* simple to use
Only for the most basic plain text emails. Anything more sophisticated
becomes really ugly if you have to do it by hand. Additionally such
classes can automatically perform some tests and prepare/sanitize/encode
the data you want to send.
>What's the attraction?
The attraction is abstraction.
I also use this class, but with my own wrapper around it. There are some
little glitches in it that I don't like, for example some method names
('isHtml' to enable HTML mode doesn't make sense, it should be 'setHtml'
or something like that, while 'isHtml' should just check the mode and
return a boolean). I also don't like having to "reset" the mailer or to
create another instance if I want to send another email. So instead of
this (pseudo-code, no actual method names):
$mailer->createMail();
$mailer->setText(...);
$mailer->addAddress(...);
$mailer->send();
$mailer->reset();
my own wrapper works more like this:
$mail = $mailer->createMail();
$mail->setText(...);
$mail->addAddress(...);
$mail->send();
Micha
Re: PHPMailer - False Positives
am 18.09.2007 23:19:51 von Bucky Kaufman
Michael Fesser wrote:
> ..oO(Sanders Kaufman)
>
>> I'm very curious to know why so many folks seem to be using this little
>> script - PHPMailer.
>>
>> I mean - the PHP mail() function is *amazingly* simple to use
>
> Only for the most basic plain text emails. Anything more sophisticated
> becomes really ugly if you have to do it by hand. Additionally such
> classes can automatically perform some tests and prepare/sanitize/encode
> the data you want to send.
I guess it's just me.
I'm pretty comfortable with manually composing email.
Kinda like a programmer who only uses notepad.
Re: PHPMailer - False Positives
am 19.09.2007 00:45:48 von Michael Fesser
..oO(Sanders Kaufman)
>I guess it's just me.
>I'm pretty comfortable with manually composing email.
Even multipart mails with boundaries, encoded attachments and proper
headers? Would be too much work for me.
Micha
Re: PHPMailer - False Positives
am 19.09.2007 00:49:15 von Bucky Kaufman
Michael Fesser wrote:
> ..oO(Sanders Kaufman)
>
>> I guess it's just me.
>> I'm pretty comfortable with manually composing email.
>
> Even multipart mails with boundaries, encoded attachments and proper
> headers? Would be too much work for me.
Yeah - but I've been doing email apps for so long by hand that it's just
less hassle to hand-code than to learn how someone els does it in
something like PHPMailer. Especially when, as you pointed out, there
are bugs in the script.
Re: PHPMailer - False Positives
am 19.09.2007 01:03:14 von Michael Fesser
..oO(Sanders Kaufman)
>Yeah - but I've been doing email apps for so long by hand that it's just
>less hassle to hand-code than to learn how someone els does it in
>something like PHPMailer. Especially when, as you pointed out, there
>are bugs in the script.
I haven't called them bugs, just some things that I don't like, because
they don't fit my own coding style.
Micha
Re: PHPMailer - False Positives
am 19.09.2007 12:29:28 von Courtney
Sanders Kaufman wrote:
> Michael Fesser wrote:
>> ..oO(Sanders Kaufman)
>>
>>> I guess it's just me.
>>> I'm pretty comfortable with manually composing email.
>>
>> Even multipart mails with boundaries, encoded attachments and proper
>> headers? Would be too much work for me.
>
> Yeah - but I've been doing email apps for so long by hand that it's just
> less hassle to hand-code than to learn how someone els does it in
> something like PHPMailer. Especially when, as you pointed out, there
> are bugs in the script.
My attitude exactly. Always reinvent the wheel, cos when it breaks, you
know how to fix it cos it's YOUR WHEEL.
Re: PHPMailer - False Positives
am 19.09.2007 12:52:54 von Bucky Kaufman
The Natural Philosopher wrote:
> Sanders Kaufman wrote:
>> Yeah - but I've been doing email apps for so long by hand that it's
>> just less hassle to hand-code than to learn how someone els does it in
>> something like PHPMailer. Especially when, as you pointed out, there
>> are bugs in the script.
>
> My attitude exactly. Always reinvent the wheel, cos when it breaks, you
> know how to fix it cos it's YOUR WHEEL.
Well... to an extent.
But I gotta say - I almost never approach one of my broken routines with
foreknowledge of how it broke. I'm almost as surprised when it breaks
as I am shocked when it works. :)
Re: PHPMailer - False Positives
am 19.09.2007 13:07:37 von NerdRevenge
The Natural Philosopher wrote:
> Sanders Kaufman wrote:
>> Michael Fesser wrote:
>>> ..oO(Sanders Kaufman)
>>>
>>>> I guess it's just me.
>>>> I'm pretty comfortable with manually composing email.
>>>
>>> Even multipart mails with boundaries, encoded attachments and proper
>>> headers? Would be too much work for me.
>>
>> Yeah - but I've been doing email apps for so long by hand that it's
>> just less hassle to hand-code than to learn how someone els does it in
>> something like PHPMailer. Especially when, as you pointed out, there
>> are bugs in the script.
>
> My attitude exactly. Always reinvent the wheel, cos when it breaks, you
> know how to fix it cos it's YOUR WHEEL.
I presume that you do not use a motor vehicle to get somewhere
then ?
bill
Re: PHPMailer - False Positives
am 20.09.2007 05:02:40 von Bucky Kaufman
bill wrote:
> The Natural Philosopher wrote:
>> My attitude exactly. Always reinvent the wheel, cos when it breaks,
>> you know how to fix it cos it's YOUR WHEEL.
>
> I presume that you do not use a motor vehicle to get somewhere then ?
Ha! I have this vision of a Little Rascals racer - with 2 car tires, a
bicycle wheel, and a wooden wagon wheel.
Re: PHPMailer - False Positives
am 20.09.2007 07:35:43 von Manuel Lemos
Hello,
on 09/17/2007 10:12 AM Lucanos said the following:
> I am currently using PHPMailer to send out a set of emails on the
> execution of a PHP Script (obviously).
> My problem is that the PHPMailer action is returning a "true" result
> each time it is executed, but not every email generated by this action
> is actually being sent.
>
> My account is hosted on HostMonster, and is pointed at the localhost
> as the SMTP server.
> I use two email list groups - one has 18 listed recipients (and sends
> between 6 and 18 actual emails) and the other has 65 recipients (and
> sendd between 7 and 26 emails).
>
> Initially the script created a new object for each email (sending them
> out as one email per recipient at the moment), and currently I am
> using the same object repeatedly (just changing the To address for
> each execution), but the fault was evident in each configuration.
>
> I am monitoring the performance of this script by BCCing a copy to a
> dropbox, which is where I am getting the actual email counts from.
>
> Anyone had a similar experience? Anyone seeing any possible fixes
> which I cannot currently see?
I don't know what could be wrong because I do not use PHPMailer, but
maybe it is not composing the messages properly for the recipients that
are not getting the messages.
Anyway, I use this other popular MIME message class which takes care of
properly encoding messages to avoid situations that could make the
messages being discard by some mail programs and servers. You may want
to try it and let me know if you still have the same problems.
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/