Announcement

Collapse
No announcement yet.

Formatting E-mail With PhP?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    No Answer?!!?!

    No one has the answer?

    Comment


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

      Comment


      • #4
        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,

        Comment


        • #5
          $msg ="You have received a request for information from the ****** online messenger \n\n :Referrers message reads :\n \n $message\n\n";
          $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: $Cmail\n";

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

          Where $Cname ,Cfax etc is form input ie:<input type=text name=Cname>

          \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.

          Comment


          • #6
            Thanks!!! Perl is soooooo slow!

            Comment


            • #7
              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

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X