/    Sign up×
Community /Pin to ProfileBookmark

Multiple email sends in blink

Hi.

I made a system that sends mesages to various emails stored in a Data base. The problem is that it takes so much time sending each one by one usign the mail(); function in php inside a for loop.

Its there a function in PHP that sends same message to diferents emails faster way.

Thanks

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@DJsACSep 04.2006 — mail the list to a mailinglist address. Usually you can set one up in the email settings of the server.

mail('[email protected]',$2,$3,$4);

[email][email protected][/email] automatically sends to all users.

if its ok the users see each others addresses, just put the whole list in the 'to', 'cc' or 'bcc' field.

one way to speed up the loop is to make sure all variables are declared before you enter the loop. (the less code in the loop, the better)

$to = "";

$from = "";

$etc = "";

for(,,) {

mail($to,$from,$subject,$headers);

}
×

Success!

Help @ricosushi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...