Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Dec 05, 2014 7:50 pm 
Offline
Newbie

Joined: Thu May 29, 2014 5:25 pm
Posts: 2
Need help with a Linux question. What exactly happens after PHP mail function is executed? Let's say I sent out 10,000 emails in a for loop. The script finished executing. What now takes control for actually sending emails out? Are they scheduled / cached somewhere? (As I understand email is not sent instantly by these large numbers).


Top
   
PostPosted: Sat Dec 06, 2014 1:49 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 1:41 pm
Posts: 955
It runs the program defined in sendmail_path to submit the message for delivery. Even if you are running something like Postfix or qmail as the mail transfer agent (MTA) on your server, it will provide a suitable program (probably named "sendmail") to perform this function. Once the message is submitted, it will be queued for delivery by your MTA.

Note that it may be inefficient to send a large number of messages in a loop using mail() - PHP recommends looking at some alternatives for this purpose.


Top
   
PostPosted: Sat Dec 06, 2014 8:34 pm 
Offline
Senior Member

Joined: Thu Feb 20, 2014 4:06 pm
Posts: 58
https://github.com/php/php-src/blob/128 ... ail.c#L101


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 87 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group