Hello Everyone,

 

I'm looking for a little help, or a nudge in the right direction I guess.
I've been working on this for awhile now and I seem to have it a wall.

 

I've been trying to create a form letter of sorts that will email to an
address I enter.  The functionality works (it enters in the variable I
specify and it sends the email), however the formatting of the email seems
to be where I hit a problem.  The formatting in both the aol.com mail and my
regular server email is still off. The aol mail looks FANTASTIC. My regular
email from my server shows all the html.

 

I used some examples that others have suggested and the problem I have is
that the HTML output varies based on the variable entered. So my message
line just equals the document results with the variable entered. ($contents)

 

Here is how I've edited the code thus far:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head><title>Send Guest Welcome Letter</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<body>

<body background="http://www.scrappalace.com/images/clouds.gif";>

<form action="welcomeletter.php" method="post">

<!-- Do this for each variable in the letter or one big variable for

$contents -->

<!-- but keep in mind there's a size limit on variables being passed -->

<p>Retreat Date:

<input type="text" name="retreatdate" value="<?php echo $retreatdate ?>">

<!-- <input name="submit" type="submit" value="Insert Date"> -->

Guest Email:

<input type="text" name="guestemail" value="<?php echo $guestemail ?>">

<input name="submit" type="submit" value="Send Email">

</p>

<p>&nbsp;</p>

<p>&nbsp; </p>

</form>

</body>

</html>

 

 

<?php

// Reads all the lines of the file into an array and

// then joins the lines into one variable

$contents = join("", file("welcome.html"));

 

// Do one line like this for each variable

$contents = str_replace("%%retreatdate%%", $retreatdate, $contents);

 

print "$contents";

 

$msg .= "$contents";

 

//$sender = "[EMAIL PROTECTED]";

 

$subject = "Guest Welcome Letter";

 

//mail headers

$headers = "From: Scrap Palace of Romeo <[EMAIL PROTECTED]> \n";

$headers .= "Reply-To: $sender\n\n";

$headers = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

 

mail($guestemail, $subject, $msg, $headers);

?>

 

So what am I still doing wrong?? You can see what I'm trying to get at by
checking here: http://www.scrapbookhut.com/welcome/welcomeletter.php.

 

I'm beyond frustrated at this point. Not to mention feeling pretty stupid.

 

Thanks for the help!!  Please!!!!  Where am I going wrong??  Is it something
here or could it possibly be something in the welcome.html (the file that is
being sent after having the variable entered)??

 

Thanks,
Jen



[Non-text portions of this message have been removed]

Reply via email to