Re: inserting HTML into PHP generated emails

From: Date: Mon, 18 Dec 2000 11:53:36 +0000
Subject: Re: inserting HTML into PHP generated emails
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30881@lists.php.net to get a copy of this message
<? mailbody = "some crazy stuff here... \n\n Your friends at emailsmiling.com \n\n\n AOL Members <a href=\"http://216.157.57.51/viewmessage.php3?id=$msgid\">Please Click Here to view your email</a> <? /// lose the "; on this lines after the <? or <?php mail($to_email, emailsmiling.com electronic email, $mailbody, "From: Emailsmiling@emailsmiling.com"); /// lose the quotes on the vars ?> now, that was just basic syntax errors, i don't know if that will solve the problem. I am not sure how the php mail function handlers HTML email, i haven't dealt with it. i mean, i believe you have to do something more than just put in the tags, because i can create tags in this email to you that i'm writing right now and it won't appear as html when you view it. ie - <b> See, this isn't BOLD and it contains tags??</b> Goto www.hotscripts.com, look under php --> tutorials --> mail systems (or something). Theres a a tutorial on sending HTML mail. It may actually be in the scripts section, not the tutorials, but i'll leave that up to you. ----- Original Message ----- From: Erik Boles <erik@rmwt.net> To: PHP3 List <php-general@lists.php.net> Sent: Monday, December 18, 2000 6:12 PM Subject: [PHP] inserting HTML into PHP generated emails > One of our clients wants to have a "clickable" URL for AOL members using the > <A href= tag, we have a php3 file that we have put that code in as follows > but it doesn't seem to be working, it simply throws the raw text to the > email rather than the HTML, any idea what we are doing wrong? > > <HTML> > <BODY> > > <?php > > $mailbody = "You have received an electronic mail sent to you by $from. > \n\n Click on the following address to take you directly to your email: > \n\n > http://216.157.57.51/viewmessage.php3?id=$msgid > \n\n If you are unable to click on the address above you may copy and > paste that address into the address box in your browser and click go. > \n\n Or please note the email number $msgid and enter it when prompted to > do so at http://www.emailsmiling.com/viewmycard.htm>. > \n\n If you wish to send an emailsmiling.com greeting just visit this > site: http://www.emailsmiling.com > \n\n Our colorful emails are easy and fun to create and they are > absolutely free! > \n\n Enjoy your email and don't just keep smiling, keep emailsmiling! > \n\n Your friends at emailsmiling.com > \n\n\n AOL Members:?> <a > href='http://216.157.57.51/viewmessage.php3?id=$msgid':ßJòKÜüð†8¬’ > jÆ>Please Click Here to > view your email</a><?php"; > > > mail("$to_email", "emailsmiling.com electronic email", > "$mailbody", "From: > Emailsmiling@emailsmiling.com"); > > ?> > </BODY> > </HTML> > > > > > Erik > > > > -- > 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 (#30881) next »