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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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? |
|
|||
|
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 ================== |
|
|||
|
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 ================== |
|
|||
|
..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 |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
..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 |
|
|||
|
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. |