here's a script i wrote a while back.....  copied and pasted.


---------------------
<?
if ($submit) {
        $headers .= "From: $myemail \n";
        $headers .= "cc:$cc \n"; 
        $headers .= "bcc:$bcc \n";
        // $headers .= "Content-Type: text/html; charset=iso-8859-1\n";

        $message = stripslashes($contents);
        header("Location:http://www.wde.org/me/";);
        mail($to, $subject, $message, $headers); 
}

else {
echo "<html>";
$myemail1 = "nothing <[EMAIL PROTECTED]>";

        echo " <br><form action=\"$php_self\" method=\"post\">
                        <table cellpadding=15 cellspacing=0 width=100%
bgcolor=#ffffff>
                                <tr>
                                        <td align=right><strong
class=black>from which account :</strong></td>
                                        <td><select name=\"myemail\">
                                                <option
value=\"$myemail1\">[EMAIL PROTECTED]
                                                </select>
                                        </td>
                                        
                                </tr>

                                <tr>
                                        <td align=right><strong
class=black>email to :</strong></td>
                                        <td><input type=text
name=\"to\"></td>
                                </tr>
                                <tr>
                                        <td align=right><strong
class=black>copy to :</strong></td>
                                        <td><input type=text
name=\"cc\"></td>
                                </tr>
                                <tr>
                                        <td align=right><strong
class=black>blind copy to :</strong></td>
                                        <td><input type=text
name=\"bcc\"></td>
                                </tr>
                                <tr>
                                        <td align=right><strong
class=black>subject :</strong></td>
                                        <td><input type=text
name=\"subject\"></td>
                                </tr>
                                <tr>
                                        <td valign=top align=right><strong
class=black>email message :</strong></td>
                                        <td><textarea cols=45 rows=15
name=\"contents\" wrap=physical></textarea></td>
                                </tr>
                                <tr>
                                        <td>&nbsp;</td>
                                        <td><strong class=black><input
type=submit name=submit value=\"send this email\"></strong></td>
                                </tr>
                        </table>
                                </form>";
}
?>
---------------------

that should work as a page in itself.... let me know if you have
problems....

/sunny


-----Original Message-----
From: Adrian D'Costa [mailto:[EMAIL PROTECTED]]
Sent: 23 July 2001 11:09
To: php general list
Subject: [PHP] mail with html


Hi,

I know this subject had been discussed here before.  Tried searching in
list.php.net, I get a message search not setup (or something).

I want to send html mails thru php using mail().  Could someone tell me
where I can study some scripts or tutorials.

TIA

Adrian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to