WordPress.org

Ready to get started?Download WordPress

Forums

wp_mail with many recipients? (2 posts)

  1. Brandon Wamboldt
    Member
    Posted 3 years 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?

  2. westondeboer
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic