Jump to content

Recommended Posts

I am trying to mass mail a newspaper with PHP mail. I am using a local SMTP server. I am trying to send 300 emails at one time (with a for loop i.e. sending the same email to the same recipient 300 times) but it only sends a few them, sometimes about 100, sometimes about 130 and so on.. Then the php script stops, it doesn't even gives me an error.

 

I tried several different SMTP servers.

 

I tried the same script on a domain and it worked perfectly.

 

I don't think that the problem is coming from the SMTP server as the script is not sending the 300 emails, it is stopping.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/50335-php-mail-stopping-after-a-few-emails/
Share on other sites

How can he put all emails on the page, i think its around 300 and may

be increasing when new user sign up.

 

the best way to do it is paginate ur script to multiple pages.

 

Like in one page 50 records.then send the email to that 50 users then go to nest page send

and so on...

 

i am not sure about this but its simple way.

 

PHP has a function to turn off limit execution time, just set that in the beginning of your script! Now your server hosting people maybe disabled the mod!

Find the function at php.net

 

If you still having problem after setting up this function you may need to set up a counter to insert to mysql record to keep track of executions!

You need to do this because the browser times itself out!

 

Set the counter in the loop!

 

Merging emails is not advised, because all email addresses will show up in an email!

I would not like to have my email address to show in other people's email!

 

If you have to do it send to list_or_what_ever@mydomain.com

and Bcc: your audience!

 

Another problem may be, that the loop works and does not time out, but you have a bad email address in a list that kills the rest of the run!

 

Debugging is fun!

 

If anyone has a PHP SMTP email script that I can use on a virtual host please PM me!

 

I do not have access to server root, only to home.

I do not have access to php.ini or apachi .config

 

I have access to .htaccess, PHP, MySql

 

Can use some help, because using PHP mail() as send mail routine for lists is no good.

And I have being using mail lists mailers that do not look professional.

 

I looked at sourceforge mailer but you need access to php.ini if I am not wrong!

There is another one called Zend, but not sure it will work on virtual host.

 

Any advise?

 

Actually I do not recommend using PHP send mail for lists, because many email server will see it as Spam!

 

So are you using a real SMPT mail() in PHP or PHP send mail mail()?

 

I have a PhpBB forum installed on my server and it uses SMPT mailer.

I need to extract the routine form PhpBB, but I have to much work to bother with it!

This script has no problem sending to 7000 users!

 

So again, if anyone has PHP SMTP mail script for virtual host please share it with us newbies! :)

 

HA, ha!!! You lucky devil, access to php.ini

 

 

This is  a sourceforge PHP mailer.

 

I am on a virtual host and do not have access to php.ini

 

Installation:

 

Copy class.phpmailer.php into your php.ini include path. If you are

using the SMTP mailer then place class.smtp.php in your path as well.

In the language directory you will find several files like

phpmailer.

 

But I can run php files from my home dir which is in php.ini include_path

So by just copying the files to any of my dir is it okay?

 

Do I need to configure the php.ini ?

Or just copy the files to a dir home or above and use require("class.phpmailer.php")

 

Sorry for asking this, because I can probably upload it and test it!

But has anyone installed it on a virtual host?

 

Thanx

 

But I can run php files from my home dir which is in php.ini include_path

So by just copying the files to any of my dir is it okay

YES

 

Do I need to configure the php.ini ?

NO . No need to do anything. just check your smtp host,smtp username and passwords are correct.

 

just copy the example shown in readme file.

and change values.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.