Jump to content

Mailing List


isedeasy

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.