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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:17:35+00:00 2026-05-27T09:17:35+00:00

When email sent to my site,the following php script will run,I did it by

  • 0

When email sent to my site,the following php script will run,I did it by Cpanel to run it when email sent.

I use this script to read email:

#!/usr/local/bin/php -q
<?php
$email = '';
$stdin = fopen("php://stdin", "r");
while (!feof($stdin)) {
    $email .= fread($stdin, 1024);
}
fclose($stdin);
$email = file_get_contents('php://stdin');
?>

now if two emails received at same time in my web site,what happend?
is there any problem to reading it?

because this script is the same as reading file.

  • 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-27T09:17:35+00:00Added an answer on May 27, 2026 at 9:17 am

    It should not be an issue to have two received simultaneously. The mail transport agent (MTA = postfix, sendmail, exim, etc) will queue them to deliver to your script. From your script’s point of view, even if multiple copies of it run as parallel processes, each individual process will receive its own STDIN input stream. They will not interfere with one another.

    It really isn’t any different than your server’s MTA receiving mail and transferring it through some processing layer like Spamassassin or Procmail.

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

Sidebar

Related Questions

I have the following ajax email submit routine on my ASP.NET WebForms web site:
I am using the following code to send email to members of my site.
Someone in email sent me letters like this IVIØR†€™ correct should be IVIØR†€™
To be short - User registers for the site An email is sent to
I want to configure SMTP on my web server, so that any email sent
I'm trying to attach a PDF attachment to an email being sent with System.Net.Mail.
Can anyone recommend a way to determine the timezone that an email was sent
If I've queued up some email to be sent via the System.Net.Mail.SMTPClent, where can
At some point, I've sent an email and it is processed and received by
I have tried to embed the icalendar code in a email to be sent

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.