Friday, January 8, 2010

Installing a PHP Form Mail Script

OK. This is a new blog.

I don't really consider myself
a PHP expert at all. Essentially,
I'm writing as I learn.

On this occasion, I'm writing
about installing a script that
I can use as a form mailer.

Here's a script that should do
the trick:

PHP MAIL FORM V2

This looks like a good one.
It especially looks good because
it is very very security conscious.

I'm going to give it a try.

OK. Here are a couple of things
I notice right off:

  1. You need to change the name of
    your script to something.php.
    The .php is important!
  2. You need to give the script
    an email address. You do this
    by filling in the $yourEmail
    in with a valid email address in
    which you'd like to receive the
    email.

Why do you need to change the name
of the file to something with a
.php on the end of it?

Because most web servers do not parse
a file for PHP code unless you
explicitly say it is a php file
by adding the .php extension.

There are ways to make the web
server behave differently than
this, but this is beyond the scope
of this blog post.

Most people depend on a .php
extension to turn their file
into a PHP program that actually
runs.

Looks like this script does not
offer SMTP authentication. I
need SMTP authentication because
the web server I'm working on
does not allow me to set up my
own email account that I can check.

I know. I know. That's weird but
that's the way it is.

Hmmm. Maybe I'll come back to
this one later.

I like the script in general. It's
just not going to meet my needs at
this time.

It's weird but I need SMTP authentication
so that I can use my mail server and
my personal email address to check
that things are working properly

After everything checks out OK, I'll
switch the email address to the
permanent email address, the one I
do not have access to.

Ed Abbott

No comments:

Post a Comment