471,092 Members | 996 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

any ideas for sending out a basic newsletter

Hi Folk

I want to send out a basic newsletter from my MySql database of contacts.

Does anyone know a nice and simple bit of PHP that allows me to do this?

TIA
- Nicolas
Jan 28 '06 #1
8 1617
windandwaves wrote:
Hi Folk

I want to send out a basic newsletter from my MySql database of contacts.

Does anyone know a nice and simple bit of PHP that allows me to do this?


Look into mail and also generating rtf or pdf from php unless it is to go
out in text format.

--
http://www.petezilla.co.uk
Jan 28 '06 #2
windandwaves wrote:
Hi Folk

I want to send out a basic newsletter from my MySql database of contacts.

Does anyone know a nice and simple bit of PHP that allows me to do this?

TIA
- Nicolas


for server processing, I would say that PHP is the wrong tool for this job.
1) time for processing email to nnnnnnnn addresses.
2) time for processing email to nnnnnnnn addresses.
......

What you probably would want to do - and there are security issues to
deal with.. is have your PHP "admin tool" kick off a job that does this
from the server...

There are a number of mailing-list/list-servers out there that would
handle this much better and run on many different platforms. (Linux,
windows, UNIX, etc...)

Michael Austin.
Jan 28 '06 #3
d
"noone" <no***@nowhere.com> wrote in message
news:gR*****************@newssvr12.news.prodigy.co m...
windandwaves wrote:
Hi Folk

I want to send out a basic newsletter from my MySql database of contacts.

Does anyone know a nice and simple bit of PHP that allows me to do this?

TIA
- Nicolas
for server processing, I would say that PHP is the wrong tool for this
job.
1) time for processing email to nnnnnnnn addresses.
2) time for processing email to nnnnnnnn addresses.
.....

What you probably would want to do - and there are security issues to deal
with.. is have your PHP "admin tool" kick off a job that does this from
the server...

There are a number of mailing-list/list-servers out there that would
handle this much better and run on many different platforms. (Linux,
windows, UNIX, etc...)


All those tools would do is exactly the same that PHP would do - talk to an
SMTP server and send out emails. Just have your PHP script respect the
limitations of your average SMTP server (as in not fire off emails to every
address at once), and you'll be fine. Learn about mime headers (especially
multipart/alternative if you want to send html and don't know who will
accept it), and you can do it all in PHP without much fuss.
Michael Austin.

Jan 29 '06 #4
d wrote:
"noone" <no***@nowhere.com> wrote in message
news:gR*****************@newssvr12.news.prodigy.co m...
windandwaves wrote:
Hi Folk

I want to send out a basic newsletter from my MySql database of contacts.

Does anyone know a nice and simple bit of PHP that allows me to do this?

TIA
- Nicolas


for server processing, I would say that PHP is the wrong tool for this
job.
1) time for processing email to nnnnnnnn addresses.
2) time for processing email to nnnnnnnn addresses.
.....

What you probably would want to do - and there are security issues to deal
with.. is have your PHP "admin tool" kick off a job that does this from
the server...

There are a number of mailing-list/list-servers out there that would
handle this much better and run on many different platforms. (Linux,
windows, UNIX, etc...)

All those tools would do is exactly the same that PHP would do - talk to an
SMTP server and send out emails. Just have your PHP script respect the
limitations of your average SMTP server (as in not fire off emails to every
address at once), and you'll be fine. Learn about mime headers (especially
multipart/alternative if you want to send html and don't know who will
accept it), and you can do it all in PHP without much fuss.

Michael Austin.


again, use the right tool for the job at hand. While PHP can "talk" to
an smtp server, I do not believe it is the right tool for the job.
Kind-of like using a spoon to shovel the driveway. While it can do it,
is it the right tool for the job. If it were one or two emails at the
click of the mouse - fine, in fact I use phpmailer to do some things for
me. But to send 50+ emails - it is the wrong tool. PHP is/was designed
for user interaction via a browser. It can do things interactively via
an interactive telnet/ssh session, but again is it the correct tool for
the job. As a sysadmin/dba I would say no. And having 20+ years of
experience supporting very large shops, (Linux, Unix 8 different
flavors, OpenVMS, Windows, Oracle, DEC/Rdb, MySQL, SqlServer, Apache,
IIS, iPlanet, OSU web server, php, html, xml, c, c++,java, cobol, smtp
servers, (mime encoding included) etc...), I *can* say with some
authority, that PHP might not be the best tool for the job.

Michael.
Jan 29 '06 #5
noone <no***@nowhere.com> wrote in
news:7J******************@newssvr14.news.prodigy.c om:
again, use the right tool for the job at hand. While PHP can "talk"
to an smtp server, I do not believe it is the right tool for the job.
Kind-of like using a spoon to shovel the driveway. While it can do
it, is it the right tool for the job. If it were one or two emails at
the click of the mouse - fine, in fact I use phpmailer to do some
things for me. But to send 50+ emails - it is the wrong tool.


i do not profess to be any sort of expert, but i use PHP to send out 3000+
emails daily to a list of subscribers (via a cron job). I get all the
addresses at once from MySQL, put them into an array, disconnect from the
database, then use a 'mass e-mail' class to compose individual emails and
send them. I just can't see any difference between PHP writing an email
and handing it off to sendmail vs having outlook/thunderbird/etc writing an
email and handing it off to sendmail.

aren't PHP discussions regarding this type of online application
irrelevant? after all, PHP has no trouble creating thousands of strings,
arrays, text files, emails, zip files, etc. all very quickly. If there's
anything to worry about, i'd figure it's the load capabilities of
'sendmail' or whatever your mail server is.
Jan 29 '06 #6
You might check with your hosting company (if you are using one)
regarding their policies before sending a mass email - some may flag
the activity as spamming.
You might also look into using a mailing list if provided - that way
your script sends one email and the mailing list takes care of the
rest. Many web hosting companies provide access to Mailman
(http://www.gnu.org/software/mailman/) or some other mailing list
utility.

Good luck

Jan 29 '06 #7
d
"noone" <no***@nowhere.com> wrote in message
news:7J******************@newssvr14.news.prodigy.c om...
d wrote:
"noone" <no***@nowhere.com> wrote in message
news:gR*****************@newssvr12.news.prodigy.co m...
windandwaves wrote:

Hi Folk

I want to send out a basic newsletter from my MySql database of
contacts.

Does anyone know a nice and simple bit of PHP that allows me to do this?

TIA
- Nicolas

for server processing, I would say that PHP is the wrong tool for this
job.
1) time for processing email to nnnnnnnn addresses.
2) time for processing email to nnnnnnnn addresses.
.....

What you probably would want to do - and there are security issues to
deal with.. is have your PHP "admin tool" kick off a job that does this
from the server...

There are a number of mailing-list/list-servers out there that would
handle this much better and run on many different platforms. (Linux,
windows, UNIX, etc...)

All those tools would do is exactly the same that PHP would do - talk to
an SMTP server and send out emails. Just have your PHP script respect
the limitations of your average SMTP server (as in not fire off emails to
every address at once), and you'll be fine. Learn about mime headers
(especially multipart/alternative if you want to send html and don't know
who will accept it), and you can do it all in PHP without much fuss.

Michael Austin.


again, use the right tool for the job at hand. While PHP can "talk" to an
smtp server, I do not believe it is the right tool for the job. Kind-of
like using a spoon to shovel the driveway. While it can do it, is it the
right tool for the job. If it were one or two emails at the click of the
mouse - fine, in fact I use phpmailer to do some things for me. But to
send 50+ emails - it is the wrong tool. PHP is/was designed for user
interaction via a browser. It can do things interactively via an
interactive telnet/ssh session, but again is it the correct tool for the
job. As a sysadmin/dba I would say no. And having 20+ years of
experience supporting very large shops, (Linux, Unix 8 different flavors,
OpenVMS, Windows, Oracle, DEC/Rdb, MySQL, SqlServer, Apache, IIS, iPlanet,
OSU web server, php, html, xml, c, c++,java, cobol, smtp servers, (mime
encoding included) etc...), I *can* say with some authority, that PHP
might not be the best tool for the job.


PHP was designed initially for use in a web server, but it can equally be
used as a scripting language in any other way that scripting languages are
used. PHP is the perfect tool for mass-mailing, if used properly. I've
worked at companies that have used to to send thousands of emails, and it
works perfectly. The SMTP server doesn't care what's talking to it, as long
as it's talked to with respect (as in not hammering it).

You can say with some authority, but you'd be somewhat wrong on this
occasion. PHP is very useful for a host of jobs it wasn't initially
designed for. PHP has come a long way since php/fi, and mailing massive
amounts of emails is one of the jobs it can do incredibly well. Equating it
to a spoon is doing it a great disservice ;)
Michael.


dave :)
Jan 29 '06 #8
d
"Good Man" <he***@letsgo.com> wrote in message
news:Xn***********************@216.196.97.131...
noone <no***@nowhere.com> wrote in
news:7J******************@newssvr14.news.prodigy.c om:
again, use the right tool for the job at hand. While PHP can "talk"
to an smtp server, I do not believe it is the right tool for the job.
Kind-of like using a spoon to shovel the driveway. While it can do
it, is it the right tool for the job. If it were one or two emails at
the click of the mouse - fine, in fact I use phpmailer to do some
things for me. But to send 50+ emails - it is the wrong tool.
i do not profess to be any sort of expert, but i use PHP to send out 3000+
emails daily to a list of subscribers (via a cron job). I get all the
addresses at once from MySQL, put them into an array, disconnect from the
database, then use a 'mass e-mail' class to compose individual emails and
send them. I just can't see any difference between PHP writing an email
and handing it off to sendmail vs having outlook/thunderbird/etc writing
an
email and handing it off to sendmail.


Sendmail can't tell the difference, and doesn't give a damn what's sending
mail through it, as long as the mails are formatted correctly :)
aren't PHP discussions regarding this type of online application
irrelevant? after all, PHP has no trouble creating thousands of strings,
arrays, text files, emails, zip files, etc. all very quickly. If there's
anything to worry about, i'd figure it's the load capabilities of
'sendmail' or whatever your mail server is.


Exactly. That's why if you get your mailer script to send the mails in
batches, having a decent pause between batches, your mail server will have
no problem. As you say, it's the mail server that is the weak link, and as
long as you code with that in mind, php is a very great tool for mass
mailing.

dave
Jan 29 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Christopher-Robin | last post: by
2 posts views Thread by Nis Sarup | last post: by
3 posts views Thread by windandwaves | last post: by
AMT India
5 posts views Thread by AMT India | last post: by
3 posts views Thread by CJM | last post: by
1 post views Thread by runway27 | last post: by

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.