开发者

Is there a PHP script to mail forms for beginners for free?

开发者 https://www.devze.com 2022-12-26 15:17 出处:网络
I have a place where I want users to submit emails for newsletter subs and a place to submit an ent开发者_Python百科ire contact form. Zero php knowledge outside of know that it can do what I need.Ther

I have a place where I want users to submit emails for newsletter subs and a place to submit an ent开发者_Python百科ire contact form. Zero php knowledge outside of know that it can do what I need.


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.


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.


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.


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 :)


As someone who is a PHP know-nothing, I often look for easy solutions to complex problems. Using a super simple PHP form can have some downsides such as getting massive amounts of spam if you don't have any measures to prevent that, setting up those measures is hard to do if you do not have any knowledge of PHP.

Here is what I found, there is a script here: http://www.dagondesign.com/articles/secure-php-form-mailer-script/ that you can download at no charge and the developer seems to have a lot guidance on how to install and use. I was able to set it up and get it to work.. not without having to spend quite of bit of time reading and trouble shooting. Hope that helps you.

0

精彩评论

暂无评论...
验证码 换一张
取 消