Auto Respond with Message

the mail() function

Moderators: macek, egami, gesf

LazyCarrot
New php-forum User
New php-forum User
Posts: 1
Joined: Mon Apr 09, 2012 5:51 am

Auto Respond with Message

Postby LazyCarrot » Mon Apr 09, 2012 6:09 am

novice coder alert here... :help: so as much handholding as you can muster please :)

I want to send an automated email reply in which the email message includes some information supplied by the user, so...

The user is presented with a form requesting: email address, name, postal address, postcode, telephone. These are entered and they press 'Submit'. (ok - i've got this far :D )

I then want to auto send an email to the email address they specified with a message containing their name address and postcode.

----

What I need is coding to allow me to extract the appropriate data from the form
Incorporate that information in a text message in the body of the email
and send the email to the specified email address

User avatar
egami
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: Auto Respond with Message

Postby egami » Tue Apr 10, 2012 5:03 am

$email = trim(strip_tags($_POST['email']));

if you named the input tag, email..


then look at php.net/mail


cya.


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest