From to mail w/ newsletter opt-in
Posted: Fri Jul 03, 2009 10:37 am
Here's what I'm trying to accomplish:
I need to be process standard web forms and have them sent to a recipient email address exactly how generic form-to-mail programs handle this. I also need an option where the person submitting the form can opt-in to our mailing list/newsletter.
Here's how I was thinking to accomplish this:
(note: I'm not an advanced programmer, just enough to be dangerous. I use pre-existing scripts and then modify them to accomplish what I need.)
By using an existing form to mail script and adding the proper code to it to tell it to open up the text file and/or database in order to append the email address to the list. This text file and/or database would be one that is used by an existing newsletter script which would facilitate the sending of the newsletter.
So in theory, I would be able to install an existing newsletter/mailing list program and would not have to modify it. I would just simply tell the program handling the form to mail to open the proper file/database and append the email address from the submitted form to that file/database. From there, I would be able to use the newsletter program to send the mail to all the users who have indicated they would like to join the list.
Does this seem like it would work? I would obviously have a check-box for the user to indicate they would like to be added to the mailing list. In this case, would I simply use an if/else if statement in the program saying if box is checked, add to mailing list, otherwise don't? Is there a better way to handle this or possibly a pre-existing program already designed to handle this that I don't know about?
Thanks for the help.
I need to be process standard web forms and have them sent to a recipient email address exactly how generic form-to-mail programs handle this. I also need an option where the person submitting the form can opt-in to our mailing list/newsletter.
Here's how I was thinking to accomplish this:
(note: I'm not an advanced programmer, just enough to be dangerous. I use pre-existing scripts and then modify them to accomplish what I need.)
By using an existing form to mail script and adding the proper code to it to tell it to open up the text file and/or database in order to append the email address to the list. This text file and/or database would be one that is used by an existing newsletter script which would facilitate the sending of the newsletter.
So in theory, I would be able to install an existing newsletter/mailing list program and would not have to modify it. I would just simply tell the program handling the form to mail to open the proper file/database and append the email address from the submitted form to that file/database. From there, I would be able to use the newsletter program to send the mail to all the users who have indicated they would like to join the list.
Does this seem like it would work? I would obviously have a check-box for the user to indicate they would like to be added to the mailing list. In this case, would I simply use an if/else if statement in the program saying if box is checked, add to mailing list, otherwise don't? Is there a better way to handle this or possibly a pre-existing program already designed to handle this that I don't know about?
Thanks for the help.