Email is the most popular Internet service today. A plenty of emails are sent and delivered each day. The goal of this tutorial is to demonstrate how to generate and send emails in PHP.
The admin code I created worked fine except for one bothersome thing. It would send out the email to multiple recipients and print the proper unsubscribe code, BUT the "From" mail header did not work the way it should have inside of the "all" loop. It should have been printing my from email address on every email address, however it was printing "nobody" instead. When I send the emails to any single person the header it printed correctly. Do you know what I was doing wrong? Read on and I'll explain.
Now that the login to the admin is successful and we have a secure environment, I need to make a form to be able to send mail to those on my list when indeed I do release new php scripts. My admin form will look a lot like the mail-to form (12/28/99) except it will have a few modifications:
Before I actually start mailing to anyone I need a script that I can link to inside every opt-in mail list email to allow subscribers to easily and automatically unsubscribe from the list. In some places, due to the rampant abuse of spammers, I believe there is legislation which requires such a link, so an ounce of prevention might be worth a pound of cure. My message will look something like this:
Joining mailing list will entitle you
to receive occasional emails informing you of news and
updates to the site and any special offers that may be
of interest to you.