Hye there;

I made a php construction which generates all the traffic for sending an ecard!

but there's one specific document which sends the receiver an email that tells him where he or she can pick up the Ecard.

The email is in short:

$msg = "Hi (x) has send you an ecard, you can pick it up by clicking (y)."

Everything that stands behind the "$msg =" string, is send in the receivers email
x = name of sender
y = unique ecard link

But what i want is that the content generated in the php3 file looks a little nicer by changing the font style in some way?

Is there anyone who knows how to handle that.

kind regards;

Siebke

    see below code to add html header to the message...this allows full html code inside the mailnote

    $to = "Whom Ever <whomever@wherever.com>";

    $subject = "Auto Form";

    $message = "
    <html>
    <head>
    <title></title>
    </head>
    <body>
    any html formatting you want and you place $variables from form here also
    </body>
    </html>
    ";

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

    $headers .= "From: You <you@you.com>\r\n";
    $headers .= "Cc: notyou@you.com\r\n";

    mail($to, $subject, $message, $headers);

      Tnx bastien;

      It worked out great.

      power to the coded mind

      regards;

      Siebke

        When using this method (which is obviously the right one), you'll probably find it a lot easier to make up your HTML mail in the text editor you use most, and then preview it your web browser of choice.

        Then you can just copy and paste the HTML into your code, and modify it so it displays the right information (variables and the like).

          that's what i did, but at first i forgot to use \ before every " i used.

          so it didn't work at first.

          But after some time it was obvious and its fine now.

          tnx for all your help!

          regards siebke;

            Write a Reply...