473,387 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Sep 17 '07 #1
9 2409
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?
Sep 18 '07 #2
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.
js*******@attglobal.net
==================
Sep 18 '07 #3
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.
js*******@attglobal.net
==================
Sep 18 '07 #4
..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
Sep 18 '07 #5
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.
Sep 18 '07 #6
..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
Sep 18 '07 #7
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.
Sep 18 '07 #8
..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
Sep 18 '07 #9
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/
Sep 20 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
by: Steven Bethard | last post by:
I feel like this has probably been answered before, but I couldn't find something quite like it in the archives. Feel free to point me somewhere if you know where this has already been answered. ...
1
by: Leszek | last post by:
Hi. I have problem with phpMailer 1.73 (windows version) After copying both class.phpmailer and class.smtp and also language file phpmailer.lang-pl to my php include directory im getting this...
3
by: Leszek | last post by:
Hi. I have problem with phpMailer 1.73 (windows version) After copying both class.phpmailer and class.smtp and also language file phpmailer.lang-pl to my php include directory im getting this...
0
by: SirShurf | last post by:
Hi, I am using a phpmailer class to send some forms over the email... And the problem is, that some ppl (especially problematic for me is the buyer....) getting the email as rough data (sorce...)...
4
by: Simple Simon | last post by:
It's entirely possible that I'm completely in the wrong line of work, but I don't see what Valgrind is complaining about in this code. Invalid read/writes? If I free the within main(), rather...
2
by: prasenjit2007 | last post by:
Hello, can u help me sending Email with attachments using the Class phpMailer. On the website I have a link to an html form in which I input the parameters with the names 1)from(textbox name)...
7
dlite922
by: dlite922 | last post by:
I can't seem to get it working with my smtp server. I can send the email through the command line like so: 220 localhost.localdomain ESMTP Sendmail 8.13.8/8.13.8; Wed, 6 Aug 2008 18:44:29...
5
by: Gilles Ganault | last post by:
Hello To handle an occasionnal flaky ADSL connection, I updated the database that handles incoming calls to have a column that is set to NULL, and then updated to either Y or N depending on...
4
KeredDrahcir
by: KeredDrahcir | last post by:
I'm trying to send an E-mail using PHPMailer and although everything look okay, it's not coming through. Can anyone help? I'm posting my information from a form. require_once...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.