Brandon Wamboldt
Member
Posted 1 year ago #
Is there any reason I shouldn't use wp_mail to send emails for my newsletter plugin? Can it handle a large number of emails? Will it slow down page loads substantially?
Would a for loop sending each email individually be a bad idea?
If it's a bad idea I guess I can use the wp crons and set a cron job to run php /var/www/vhosts/mysite/httpdocs/index.php to ensure it is run at a minimum rate.
Any ideas?
If you have thousands of emails to send, I would limit how many are sent at one time. Th sending of emails takes a lot of resources on a server.
Also some hosts restrict how many emails that you can send per hour. Dreamhost and Media Temple are two that do. To try and thwart spam.
A for loop for not be a bad idea at all. Putting the emails into an array and then doing them in batches.