Send single email for forum reply though every email in to field?
Instead of putting the mail command in a foreach and using BCC?
JAB Creations
10:24 pm on Nov 21, 2009 (gmt 0)
I'm currently working on the email subscription feature for my site's forums. I'm trying to find the most efficient way to send emails for new replies to people. Is there a way to have each person's email address in the to field by executing the mail function only once or would I have to stick the mail function in to a foreach loop? I don't want to use BCC as this looks like spam.
- John
coopster
8:18 pm on Nov 29, 2009 (gmt 0)
foreach loop is the only way otherwise every user is going to see every other user's email address in the To: header. That's the beauty of bcc. Notify your user's upon registration to set their spam filters to allow mail from this sender and you should be fine.
JAB Creations
9:35 pm on Nov 29, 2009 (gmt 0)
I finished setting this up and it works fine even though I'm aware that foreach loops aren't highly efficient in regards to server loads.
I was trying to setup my server's SPF though can't since that requires cPanel 11 and we have 10 so in example Hotmail treated my site's email suspiciously.