Jump to content

Recommended Posts

I have created a mailing list where users can sign-up with their name and email address.

 

I know have a mysql table with columns `name`, `email` and `key` (random string for unsubscription).

 

My question is, whats the best way to send off the emails? I want to send off daily emails which get the content from a dynamic php page.

Link to comment
https://forums.phpfreaks.com/topic/220465-mailing-list/
Share on other sites

Each email needs to send a unique key so how do I send individual emails with out looping?

 

I currently us PHPMailer class to send emails via smtp would I be able to use that? Sorry if I sound like a n00b but this is all new to me.

What I meant was not to use the mail() function within a loop i.e

foreach($addresses as $email) {
mail($email, 'subject', 'body', $headers);
}

Quote from php.net

It is worth noting that the mail() function is not suitable for larger volumes of email in a loop. This function opens and closes an SMTP socket for each email, which is not very efficient.

 

http://uk.php.net/manual/en/function.mail.php

 

PHPMailer is suitable. Also PEAR Mail http://pear.php.net/package/Mail

Link to comment
https://forums.phpfreaks.com/topic/220465-mailing-list/#findComment-1143926
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.