FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Re: Php variables to an email.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Php variables to an email. [message #169348] Tue, 07 September 2010 23:52 Go to previous message
GarryJones is currently offline  GarryJones
Messages: 21
Registered: September 2010
Karma:
Junior Member
> Some code for us to had a clue what it is about would be good. none of
> us is clairvoyant here. ;)

Ok, I thought maybe it would be quicker if someone could just point me
in the right direction, it must be an everyday thing to do with php
but I can't find a simple solution. Just websites tha confuse me with
great complex answers involving pear,perl and mime but I am not
interested in learning something new, I just need this to work in an
easy way with php.

After reading in the values I am trying to send the values $bokfor and
$bokeft in the following email. I receive the php code and not the
actual variable.

<?php
// multiple recipients
$to = 'garry(at)vasatrampet(dot)se' . ', ';
$to .= 'info(at)vasatrampet(dot)se';

// subject
$subject = 'Whatever';

// message
$message = "
<html>
<head>
<title>Bokningsbekräftelse</title>
</head>
<body>
<p>Hej<?= $bokfor ?>&nbsp;<?= $bokeft ?>, tack för din bokning!</p>
</body>
</html>
";

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= 'To: Garry <garry(at)cykeltours(dot)se>' . "\r\n";
$headers .= 'From: Garry <garry(at)vasatrampet(dot)se>' . "\r\n";
$headers .= 'Bcc: garry(at)vasatrampet(dot)se' . "\r\n";

// Mail it
mail($to, $subject, $message, $headers);
?>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Openssl through HTTP Proxy (cUrl?)
Next Topic: executing command with shell_exec()
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 07:41:22 GMT 2024

Total time taken to generate the page: 0.04201 seconds