# Php mail() to 1000..better way?

**URL:** <https://forum.kirupa.com/t/php-mail-to-1000-better-way/182995>\
**Category:** Uncategorized\
**Created:** [March 23, 2006, 12:53am UTC](https://forum.kirupa.com/t/php-mail-to-1000-better-way/182995 "2006-03-23T00:53:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DHDesign](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@DHDesign](https://forum.kirupa.com/u/DHDesign)\
**Post date:** [March 23, 2006, 12:53am UTC](https://forum.kirupa.com/t/php-mail-to-1000-better-way/182995/1 "2006-03-23T00:53:37Z")

</div>

i am writing a script that will email project specifications to nearly 1000 email addresses in the DB.

i could use PHP’s mail() function and place a sleep function in there for every 50 emails or something so that the server doesnt time out…

but is there a better way of doing this?  
anyone have any ideas or sample scripts?

thanks a million!  
ps - URGENT!!! 🙂

---

<div class="post-metadata">

**Author:** ![ironikart](https://avatars.discourse-cdn.com/v4/letter/i/7feea3/32.png) [@ironikart](https://forum.kirupa.com/u/ironikart)\
**Post date:** [March 23, 2006, 1:03am UTC](https://forum.kirupa.com/t/php-mail-to-1000-better-way/182995/2 "2006-03-23T01:03:23Z")

</div>

If you’re scripts have the ability to run exec() on a linux server then you could pass the emails to sendmail directly.

Also, check out ‘phpmailer’, it’s supposed to be pretty good for mass email.

---

<div class="post-metadata">

**Author:** ![DHDesign](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@DHDesign](https://forum.kirupa.com/u/DHDesign)\
**Post date:** [March 23, 2006, 1:22am UTC](https://forum.kirupa.com/t/php-mail-to-1000-better-way/182995/3 "2006-03-23T01:22:49Z")

</div>

thanks for the reply…two things:

1. scripts cant run exec()
2. ive heard about phpmailer, but id rather write my own function that will do this (don’t want to waste a bunch of time understanding someone elses code).

any other ideas of emailing roughly 1000 users with a simple email (no attachments or anything…just simple text)

thx

---

<div class="post-metadata">

**Author:** ![Friendly](https://avatars.discourse-cdn.com/v4/letter/f/b5e925/32.png) [@Friendly](https://forum.kirupa.com/u/Friendly)\
**Post date:** [March 23, 2006, 6:10pm UTC](https://forum.kirupa.com/t/php-mail-to-1000-better-way/182995/4 "2006-03-23T18:10:44Z")

</div>

> **[Is it possible for php to check for file on users computers?](https://www.kirupa.com/forum/showthread.php?t=210964)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

skyo sucks monkey balls!
