tags:

views:

66

answers:

4

I have a place where I want users to submit emails for newsletter subs and a place to submit an entire contact form. Zero php knowledge outside of know that it can do what I need.

+2  A: 

There's a mail function built-in, take a look at

http://php.net/manual/en/function.mail.php

you will however, need to format the email body with the form data posted, of course.

K2so
+1  A: 

Actually, you don't need to do any php programming to create a such a setup. There are plenty of mailing list software apps available and you can grab a formmail script (like the one from Matt's Script Archive) and build the html with the right fields.

webbiedave
What's the saying: good coders imitate, great coders steal? :) (see http://www.codinghorror.com/blog/2004/12/never-design-what-you-can-steal.html)
gregmac
+1  A: 

Check out FormToEmail. From their site:

FormToEmail is a PHP form mail script. It comes in a free version and a Pro version. It processes web forms and sends the contents of the form to you by email. It will process any form. It doesn't make forms but it comes with HTML code for a basic contact form that you can use on your website. It is very secure and cannot be hijacked by spammers. It is very simple to install, you only need to add your email address to it. Step-by-step instructions written in plain English.

Josh
A: 

Use the mail function.

However be aware that you need to specify the correct headers yourself if you want to use html in your emails!

A common beginner's mistake is assuming you can simply use html tags with mail and it should work automatically.

Figured this was worth mentioning, since you are wanting to do a newsletter. If you try sending the email, and the raw html tags seem to appear in the message, this is your issue :)

Cam