PHPMailer - False Positives

This is a discussion on PHPMailer - False Positives within the PHP Language forums, part of the PHP Programming Forums category; Hi All, I am currently using PHPMailer to send out a set of emails on the execution of a PHP ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-17-2007
Lucanos
 
Posts: n/a
Default PHPMailer - False Positives

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

Reply With Quote
  #2 (permalink)  
Old 09-18-2007
Sanders Kaufman
 
Posts: n/a
Default Re: PHPMailer - False Positives

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?
Reply With Quote
  #3 (permalink)  
Old 09-18-2007
Jerry Stuckle
 
Posts: n/a
Default Re: PHPMailer - False Positives

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
==================
Reply With Quote
  #4 (permalink)  
Old 09-18-2007
Jerry Stuckle
 
Posts: n/a
Default Re: PHPMailer - False Positives

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
==================
Reply With Quote
  #5 (permalink)  
Old 09-18-2007
Michael Fesser
 
Posts: n/a
Default Re: PHPMailer - False Positives

..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
Reply With Quote
  #6 (permalink)  
Old 09-18-2007
Sanders Kaufman
 
Posts: n/a
Default Re: PHPMailer - False Positives

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.
Reply With Quote
  #7 (permalink)  
Old 09-19-2007
Michael Fesser
 
Posts: n/a
Default Re: PHPMailer - False Positives

..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
Reply With Quote
  #8 (permalink)  
Old 09-19-2007
Sanders Kaufman
 
Posts: n/a
Default Re: PHPMailer - False Positives

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.
Reply With Quote
  #9 (permalink)  
Old 09-19-2007
Michael Fesser
 
Posts: n/a
Default Re: PHPMailer - False Positives

..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
Reply With Quote
  #10 (permalink)  
Old 09-19-2007
The Natural Philosopher
 
Posts: n/a
Default Re: PHPMailer - False Positives

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.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:44 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0