RE: [PHP] mail with html

From: Date: Mon, 23 Jul 2001 10:06:14 +0000
Subject: RE: [PHP] mail with html
Groups: php.general 
Request: Send a blank email to php-general+get-59168@lists.php.net to get a copy of this message
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 <nothing@nothing.com>"; 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\">nothing@nothing.com </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:adrian@pcsadvt.com] 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: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#59168) next »