Email Subscription Code
Filed Under Technology->
Okay, this would really show how easily I get excited even with small and simple things. It is just too enjoyable to learn someting new.
I’ve finally able to make the “subscribe me” feature of one of the sites I’m maintaining, ihmanian94. With the help of the codes of SubscribeMe2 plugin for wordpress and WordPress itself, I was able to create my own simple code. So here’s what I just want to achieve…
User Requirement:
Allow user to subscribe to the kamangyanan eGroup in Yahoo by just entering their email address in the frontpage of the webpage.
Technical Details:
1. Webpage should have a form where visitors can enter their email address
2. Sending of email must be triggered when ENTER key is pressed
3. Email address must be valid
4. Email request must be sent to kamangyanan-subscribe at yahoogroups.com
5. Provide a confirmation page
6. Lastly and most importantly, the email address of the user must appear as the sending party (FROM_EMAIL).
To implement all of these, I used the surprisingly powerful and easy to use command of PHP — mail. Here’s the syntax :
// mail(EMAIL_TO_ADD, SUBJECT, BODY_TEXT, HEADER_TXT);
For the requirement #1, #2 and #3, I placed the following code somewhere in the main page.
Main Page:
For the purpose of showing you the codes, I replaced < with

