Welcome Guest, Not a member yet? Register   Sign In
Email class
#1

[eluser]Unknown[/eluser]
Hi i am php developer i need to code a script to send a mail to many address.
I found the email class of codeigniter.My question is how many address can i add to this
line of code?

$this->email->to('[email protected], [email protected], [email protected]');

there is a limit of address or i can add for example 20.000 address if i need it.

thank you for your help.

Bye.
#2

[eluser]BrianDHall[/eluser]
First, this will set all emails as being "To", so it'd be like just pasting a huge string of email addresses into the To field of any email client, so they'd all get each others email addresses. Not recommended.

Check the clear() function of the email class for an example of looping through lots of email addresses: http://www.codeignitor.com/user_guide/li...email.html

There is no effective limit for how many emails you can handle this way, but note that each email being sent takes some manner of time - with 20k addresses you'd hit PHP's max execution limit way before you were done. For such large amounts of email addresses you would probably want to look into executing something from cron, as running a script from the command line eliminates max time execution limits.




Theme © iAndrew 2016 - Forum software by © MyBB