Hi,

I am trying to create an html automatic response email to users that
fill out a form.

Workflow - 

1. User fills out form and selects submit
2. The contents of the form are then mailed to a secretary for record
keeping
3. (Where the problem is) An html based email is sent to the email
address that the user entered into the form.
4. The user is redirected to a confirmation page

Ok - steps one and two work fine so on to step three.

After the code that mails the form then my code --

if ("PHP_MAIL_FORM=true") 
{
$to = "$address_email";
$subject = "Uncharted Outposts Newsletter";
$message = <html><p>Test Email</p></html>;        
$headers = "To: $name_first <$address_email>\nFrom: <My
Company>\nReply-To: <My Company>\nMIME-Version: 1.0\nContent-type:
text/html; charset=iso-8859-1\n"; 
mail($to, $subject, $message, $headers);      
}

Where $address_email and $name_first are variables from the form

The script as is works fine, but I want to assign the contents of a
separate file (a web page) to $message instead of inserting the contents
of the file as a string in the actual script. I want the body of the
email to come from a separate file to help make changing the body of the
email easier too. I tried using - 

readfile("includes/news.html")

But that did not work and instead inserted file into the actual webpage
instead of the email.

Does anyone have an idea or suggestion?

Thanks for your help,

Ed


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to