Hello guys
I have to send HTML email to over 1000 email addresses and I believe that at some point server will stop sending them even if my script works perfect on fewer email addresses. Basically I am looping through an array like this
[PHP]
$message = "some html";
$emails = array("email1@example.com", "email2@example.com",.... );
foreach($emails_array as $email){
$headers = 'MIME-Version: 1.0";
$headers .= 'Content-type: text/html; charset=iso-8859-1";
$headers .= 'To: $email' . "\r\n";
$headers .= 'From: Buldog Promo<name@example.com>' ";
mail($email, $subject, $message, $headers);
}
[/PHP]
My question is:
What is max number of elements array $emails should hold?
OR
Do you know way around this problem
Thank you for your Help
5 1044
Best thing you could do is contact your hosting provider and find out if they have a cap on how many emails you can send, say, per hour. PHP itself, as far as I know, doesn't limit the emails, but it will crash if you don't set the max execution time.
Cheers,
Markus.
Atli 5,058
Expert 4TB
Hi.
PHP doesn't limit it, but like Markus says, your host might.
You could also try sending to multiple email addresses at once.
See the manual for examples.
Or better yet, you could try one of the mailer classes, like PHPMailer. Usually works a lot better than the mail function. The manual even mentions that using the mail function with complex mails, like HTML mails, is not recommended.
Hi.
PHP doesn't limit it, but like Markus says, your host might.
You could also try sending to multiple email addresses at once.
See the manual for examples.
Or better yet, you could try one of the mailer classes, like PHPMailer. Usually works a lot better than the mail function. The manual even mentions that using the mail function with complex mails, like HTML mails, is not recommended.
You should be on PHPMailer's payroll, considering all the effort you put in to marketing them.
:P
Markus.
Heya, Zorgi.
Is your script completing without any errors? Perhaps it times out after 1000 or so emails?
Heya, Zorgi.
Is your script completing without any errors? Perhaps it times out after 1000 or so emails?
Thank you guys,
Script works great. All information I got here was very useful and needed. I would also recommend PHPMailer if you don't want your emails to end up in someones junk mail. Also... do contact your host and ask them how many emails you can send an hour.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: simonc |
last post by:
I've been programming in assembler and C/C++ for a number of years, but I'm
only just starting down the road of PHP & MYSQL.
I have a couple of questions:
(1) Before I start writing my own...
|
by: dan glenn |
last post by:
I'm creating HTML emails from a PHP site and sending them out to an email
list (just about 40 people so far are on this list). I've tested and
confirmed that these emails work in yahoo.com's...
|
by: Thomas Mandelid |
last post by:
A client I`m working for want to be able to send multiple emails to
customers of their own. I have developed a simple app to accomplish this,
but the application has a few flaws and I`m looking for...
|
by: ItsMe |
last post by:
Dear All,
I'm getting junk email with around 140-150 kb almost everyday and it my
mailbox is getting full and this emails are full of virus effected
attachments.
And I'm getting these emails...
|
by: Kun |
last post by:
i have the following code:
----------------------------------
import smtplib
from email.MIMEText import MIMEText
fp = open('confirmation.txt', 'rb')
msg = MIMEText(fp.read())
From =...
|
by: sck10 |
last post by:
Hello,
I am working on a new project where I need to:
1. open an email and then create an xml file from the email
2. open the xml file and parse the information.
I would like to be able to do...
|
by: Jai |
last post by:
Hi,
I am in a problem of sending mass emails(newsletter) to my website
members.
Actually my problem is this:
I want to send newsletter to my website members. But I had given a
facility for...
|
by: =?Utf-8?B?RGFuY2Vy?= |
last post by:
Hi,
I was attempting to check my new incoming emails through Outlook Express (I
have Windows 98, 2nd Edition). My computer seemed to be having a problem
accessing and opening the emails, and the...
|
by: =?Utf-8?B?Q2hhcmxlcw==?= |
last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all
my emails stored on the Yahoo! server. However sometimes I can’t get access
to a PC/the web and I download my emails...
|
by: =?Utf-8?B?UmljaA==?= |
last post by:
Hello,
My company will be hosting a webcast, and I need to send out 2000 individual
emails to people who signed up (for login information...). I created an smtp
app that I can loop through...
|
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,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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,...
|
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...
| |