Formatting E-mail With PhP?

  • Is there a way to format e-mail with PhP? I have not read anything about it.... But I know that it is possible with CGI.

    Hartmann
    Fort Bend Internet Designs (http://www.fbid.net)


  • $msg ="You have received a request for information from the ****** online messenger nn :Referrers message reads :n n $messagenn";
    $msg .="Received from:t $Cname n";
    $msg .="Phone No:t $Cphone n";
    $msg .="Fax No:t $Cfax n";
    $msg .="E-mail:t $Cmail n";
    $recipient ="info@************.com.au";
    $subject = "$Csubject";
    $mail_headers ="From: ********** MailerDaemon <>n";
    $mail_headers .="Reply to: $Cmailn";

    mail ($recipient,$subject ,$msg ,$mail_headers);
    $Orecipient ="*****@*********.com.au";
    mail ($Orecipient,$subject ,$msg ,$mail_headers);

    Where $Cname ,Cfax etc is form input ie:

    t is a newline t is a tab! you can also get PHP to generate HTML output for e-mail its just a matter of adding the appropriate headers etc.


    (The form above mails to 2 recipients)

    Play around with it - its heaps easier and more customisable than PERL.


  • yes, you can format email that is sent out through PHP. What specifically are you wanting to do ?


  • Thanks!!! Perl is soooooo slow! ;)


  • you can do some pretty sexy thing with the array $HTTP_POST_VARS

    check it out @ php.net

    for example:

    you post a form with name and address in it

    at the receiving end you can just loop through $HTTP_POST_VARS and format then Vars nciely on the page (or in ths case the mail)

    I'm sure someone has already done this, do a trawl on one of the script sites like weberdev.net

    regs


  • Have you seen the script formmail.pl? It takes a form and makes it into a readable format. So if I had a form that had a text field called "Name" in the e-mail it would show up as Name: Persons Name.


    Thank you,


  • No one has the answer?







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Formatting E-mail With PhP? , Please add it free.