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 6993525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:46:33+00:00 2026-05-27T19:46:33+00:00

in php5 web app, getting email address from user and sticking it into database,

  • 0

in php5 web app, getting email address from user and sticking it into database, but want to send the email without user waiting for the email to complete. using gmail, sometimes takes a few seconds.

thinking about fopen( "http://self.com/mailer.php", "r" ), where mailer.php would do the actual mailing. will this work?

  • 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-05-27T19:46:33+00:00Added an answer on May 27, 2026 at 7:46 pm

    There are two approaches that have worked well for me in the past.

    Database Email Queue

    Create an “email_queue” table in your database or whatever else you are using for persistent storage. Each entry contains everything you will need in order to send an email (e.g. Subject, recipient, sender, body, etc…) and a “sent” flag field. To send an email you add an entry to this table using a helper class.

    Then you create a cli php script that reads from the queue table filtering for entries that have the sent flag set to 0, send the email and finally set the sent flag to 1. This script needs to run in a cron job, but since you probably want to run it more often than one minute, you can use something like Frequent-cron. The scheduled task should only run in one web server in case you have many (and assuming your persistent storage is shared).

    Local email queue

    I’ve also had some success configuring a local postfix server on each web server to deliver mail using an external smtp service. The goal here is to get postfix to accept the email as fast as possible (because it is local) and then deliver it via the external SMTP server in a different process. Postfix will act as an intermediary queue.

    I personally like the first solution because it gives your app more information about email delivery for statistical analysis’ record keeping, etc..

    Hope that helps.

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

Sidebar

Related Questions

I need to take a picture from a webcam into a webapp (PHP5/JQuery/HTML5) but
In my php5 web-application i use zend mailMerge for constructing doc/pdf files from user
In our web-app we use PHP5.2.6 + PDO to connect to a SQL Server
I want to deploy my Symfony2 project into my server and capifony but I
My web-app is located in mysite.com:8080. I want to access to it by typing
I am intending to use SQLite 3 with PHP 5. I found this: http://packages.debian.org/etch/web/php5-sqlite3
I'm building a web application using PHP5.3 and Zend Framework 1.9.4. i have an
I have a PHP5/Zend Framework 1.8.1 web site which is located at: http://www.example.com/foo The
I have written a Java application that runs from the command line. I want
I am working on a PHP web app with another developer. We have 3

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.