Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  permalink
    I am using the following code for sending info from a form to an email address. It is working very nicely, however I am new to the world of PHP. I know that "\n" works as a line break. I am eager to learn more PHP text styling, like how would I make bold text, headers etc. appear in the email I receive?

    <?php
    $recipient = "email@email.net";

    $subject = "Message from $firstname $lastname";

    $content = "Name: $firstname $lastname \n Email: $email) \n Message: $message";

    mail($recipient, $subject, $content) or die("Could not send email!");
    ?>

    I suppose what I'm really looking for is a good link. Thanks in advance.
    • CommentAuthorspyyddir
    • CommentTimeJan 5th 2006
     permalink
    You can send email as html. Its as stylable as any page you make. The only stuff like that php can do (as far as I know) is \n (newline) and \t (tab).
  2.  permalink
    \n\r

    Anyways, you will want to watch out for form injection and such.
  3.  permalink
    Hi There!

    Well I'm not here to teaching you php but in a lame terms you output should be in html format. Since you not PHP expert don't waste you time at this point and go with solution that somebody build. No reason to invent bike!!!
    Here is the link for you - This script does everything you can imagine and more
    http://www.tectite.com/formmailpage.php?WWWTECTITE=990be5402058d73dd4fc6ba5ed7fa4a8

    Cheers, DS
    • CommentAuthorSam K
    • CommentTimeJan 6th 2006
     permalink
    Don't give him a link to an over-complecated script when he wants to learn. There may not be any point in inventing the bike, but it's a fun and rewarding thing to do.
  4.  permalink
    Thanks guys.

    I found this to be a helpful tutorial.
    • CommentAuthorSayian
    • CommentTimeFeb 9th 2006
     permalink
    Pear also has a very nice class for sending mail

    http://pear.php.net/mail
Add your comments
    Username Password
  • Format comments as (Help)