Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8900835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:11:50+00:00 2026-06-15T01:11:50+00:00

I have a working mailer script which has already started sending out mails. We

  • 0

I have a working mailer script which has already started sending out mails. We need to send an email message to approximately 5,000 email addresses. I have a few problems though.

1.) It’s sending out really slow. I’m guessing it’s the embedding? The image is 300+kb big, is it supposed to slow the sending down like that? The mail is sending like 3 emails per minute. And it’s going to take a lot of time if we want to send the email to 5000 recipients. The code is something like this:

$mail->AddEmbeddedImage("rocks.png", "my-attach", "rocks.png");
$mail->Body = 'Embedded Image: <img src="cid:my-attach"> 

2.) We have registered for an smtp which will not limit us to 100 emails per day. It’s something like pay as you go and it keeps track of the messages sent. When I checked the log, there were duplicated messages. There were some recipients which were sent twice, the weird thing is it just tries to send the message twice and then moves to the next email addresses. The problem about that is that it consumes our limit from the smtp service and also adds too many queues in the mail which makes the sending even longer. My send code is something like:

if(isset($fromaddress)){
do{
$mail->AddAddress($row['email']);
$mail->Send();
$mail->ClearAddresses();
}
while ($row = mysql_fetch_array ($result));
}

And my query is something like :

SELECT * from email where id > 200

You may be wondering about my query. I was in need of having to send the mails from where it left off from timing out due to connection problems so I made a id column and I assign the number as the id of the last email address the mail was sent to. I don’t know if that was wise but that was what I had at the moment. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:11:51+00:00Added an answer on June 15, 2026 at 1:11 am
    1. Depending on how PHPMailer is built, yes, it may very well slow it down so much. The reason is pretty simple: if you’re mailing as an attachment, the mail call has to know the exact byte size of the mail. It does this by preparing it, which includes reading the image in its entirety. This is a pretty small delay on one email, but if it has to do it 5000 times… Consider queueing and a worker approach.

    2. Add a field to your database, call it mailSent, type BIT. Every time you send one, set it to 1 for the appropriate row. To select emails, SELECT * FROM mails WHERE mailSent='0' LIMIT 100.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have working website in PHP with a MySQL backend which has several tables
I'm working on a Rails project that utilizes Action Mailer to send out mail
I have working registration script the only problem is that i do not know
I have a third party library which I finally have working within my MonoTouch
I'm working on a real estate site and need to make notification mailer: when
I'm having an issue with a simple PHP mailer. I've had this script working,
I have a function to send emails the strange thing is that its working
On a current project which I'm currently working, i have a symfony task that
I'm working on an in-app email function, and right now I have the line
I have created two mailers, one of which is not working in production on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.