I cannot send emails more than 5 in php

Yes! Its automatically increases ohkey i removed it but still its dosn’t send more than 5 emails

What do you mean by “More than 5 e-mails”? Are you sending all e-mails at the same time? If so, how many?

1 Like

Look i have a email column in database and inside it i have emails with the help of php code i m just trying to send emails at the same time.

Right now i have 5 emails in my table if i increases the amt of email address then it show the error
echo ’ Error! please Try After Sometime’;
But besides it work perfectly

Please add the following code to your .htaccess and try again…

php_value output_buffering on
2 Likes

Sir will u plz tell me what does this function do?

Trust us, it will not hurt your website, it’ll just enable some functionalities :wink:

1 Like

I fully trusted webhost community just ask for general knowledge perpose. Right its 1 am of the morning here i just continue soon plz dont close the conversation

php_value output_buffering on has been enabled now @nginx

3 Likes

I fully trusted webhost community just ask for general knowledge perpose. Right its 1 am of the morning here i just continue soon plz dont close the conversation

output_buffering in large explained manages the headers and if it is not enabled it can cause problems to sessions and e-mails over a certain length.

2 Likes

its already on

I have managed to send from your websites 10 e-mails in bulk using a loop without problems:

$i = 1;

while($i < 11)
{
   mail($to, $subject, $txt, $headers);
   $i++ ;
}

Either your e-mail provider is throttling your e-mails to prevent spam, either there is a bug in your code.

2 Likes

$sql = “select email from email”;
$result = mysqli_query($db, $sql);
while ($row = mysqli_fetch_array($result)) {
if (!empty($row[‘email’])) {
$email_list .= $row[‘email’] . “,”;
}
}
$email_list = rtrim($email_list, ‘,’);
echo $to = “$email_list”;
$i = 1;

while($i < 11)
{
mail($to, $subject, $txt, $headers);
$i++ ;
}
I combine ur idea is that right?

$sql = "select email from email";

You want to select all rows from column email?

1 Like

yes! using this i selected all emails from the cols

I think your code might work, yes.


If it doesn’t then some bug occurs when retrieving/processing the information from database.

1 Like

your code run perfect but but instead of sending more than 5 emails its print error more than 5.

which mean my code run perfect as well as yours but there might be problem with the server!.

What is the website in question?

currently i have 5 email in my db.

and after press submit button and combined your code here whats happen…

your code run perfect but but instead of sending more than 5 emails its print error more than 5.

You’re probably passed the MAX_UPDATES_PER_HOUR resource. We have no problems on our side.

and after press submit button and combined your code here whats happen…

Ok…

1 Like

here is the currently code applied