Sending PHP forms via HTML email

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • philphanluvr@hotmail.com

    Sending PHP forms via HTML email

    How do I sent content of a PHP form via HTML email?

    For example, fields $name, $city, $state, $phone, $location

    to HTML:

    <p>Congratulati ons $name from $city, $state with the phone # $phone .
    You now get an expense paid trip to $location .

    And that HTML outputted in email..so someone checks their email,they
    have an HTMl certificate generated from a form in PHP.
  • sk

    #2
    Re: Sending PHP forms via HTML email

    The PEAR Mail_mime module is pretty great for this. It makes generating
    even multipart/alternative mail with inline image attachments easy.

    Head over to http://pear.php.net

    --
    Steve Koppelman
    Wij geloven in onafhankelijk denken en het aangaan van oprechte connecties. Wij laten jouw business betekenisvol groeien. Hoe? Dat lees je op onze site.


    philphanluvr@ho tmail.com wrote:[color=blue]
    > How do I sent content of a PHP form via HTML email?
    >
    > For example, fields $name, $city, $state, $phone, $location
    >
    > to HTML:
    >
    > <p>Congratulati ons $name from $city, $state with the phone # $phone .
    > You now get an expense paid trip to $location .
    >
    > And that HTML outputted in email..so someone checks their email,they
    > have an HTMl certificate generated from a form in PHP.[/color]

    Comment

    • philphanluvr@hotmail.com

      #3
      Re: Sending PHP forms via HTML email

      Unfortunately it requires installing Pear, more than I bargained for.
      Any other alternative?

      sk <steve-no-spam@hatless-dot-com-without-the-spam.com> wrote in message news:<nk3kb.579 409$Oz4.558595@ rwcrnsc54>...[color=blue]
      > The PEAR Mail_mime module is pretty great for this. It makes generating
      > even multipart/alternative mail with inline image attachments easy.
      >
      > Head over to http://pear.php.net
      >
      > --
      > Steve Koppelman
      > http://www.hatless.com/
      >
      > philphanluvr@ho tmail.com wrote:[color=green]
      > > How do I sent content of a PHP form via HTML email?
      > >
      > > For example, fields $name, $city, $state, $phone, $location
      > >
      > > to HTML:
      > >
      > > <p>Congratulati ons $name from $city, $state with the phone # $phone .
      > > You now get an expense paid trip to $location .
      > >
      > > And that HTML outputted in email..so someone checks their email,they
      > > have an HTMl certificate generated from a form in PHP.[/color][/color]

      Comment

      • sk

        #4
        Re: Sending PHP forms via HTML email

        philphanluvr@ho tmail.com wrote:[color=blue]
        > Unfortunately it requires installing Pear, more than I bargained for.
        > Any other alternative?[/color]

        1. Find an HTML email somewhere in your inbox.

        2. View source.

        3. Look at how the message is formed.

        4. Form a message that resembles it structurally. For the bulk of the
        body, "heredoc" syntax is your friend. What you want to do is build the
        body as one long string, with the variables you want inserted in the
        appropriate places, just like you would if you were making a web page.
        Then pay attention to the headers that define it as a MIME message with
        HTML contents, as well as any MIME separators in the message itself.
        You'll need to add those headers using the API of whatever mail call you
        use, and add the in-message separators manually to the body of the message.

        5. Send the mesaage.

        6. Make sure it arrives and displays properly in a couple of
        representative mail programs. Some mail programs are more forgiving of
        little MIME mistakes than others.

        6. After you do this a few times with convoluted, cranky code to get the
        headers and separators working just right, see if you can use PEAR's
        Mail_mime in the future. It's installed by default with newer releases
        of PHP, and isn't too difficult to install otherwise as long as you have
        control over php.ini. If your web host can't or won't support PEAR, ask
        yourself why.
        [color=blue]
        >
        > sk <steve-no-spam@hatless-dot-com-without-the-spam.com> wrote in message news:<nk3kb.579 409$Oz4.558595@ rwcrnsc54>...
        >[color=green]
        >>The PEAR Mail_mime module is pretty great for this. It makes generating
        >>even multipart/alternative mail with inline image attachments easy.
        >>
        >>Head over to http://pear.php.net
        >>
        >>--
        >>Steve Koppelman
        >>http://www.hatless.com/
        >>
        >>philphanluvr@ hotmail.com wrote:
        >>[color=darkred]
        >>>How do I sent content of a PHP form via HTML email?
        >>>
        >>>For example, fields $name, $city, $state, $phone, $location
        >>>
        >>>to HTML:
        >>>
        >>><p>Congratul ations $name from $city, $state with the phone # $phone .
        >>>You now get an expense paid trip to $location .
        >>>
        >>>And that HTML outputted in email..so someone checks their email,they
        >>>have an HTMl certificate generated from a form in PHP.[/color][/color][/color]

        Comment

        • Manuel Lemos

          #5
          Re: Sending PHP forms via HTML email

          Hello,

          On 10/18/2003 01:12 AM, philphanluvr@ho tmail.com wrote:[color=blue]
          > How do I sent content of a PHP form via HTML email?
          >
          > For example, fields $name, $city, $state, $phone, $location
          >
          > to HTML:
          >
          > <p>Congratulati ons $name from $city, $state with the phone # $phone .
          > You now get an expense paid trip to $location .
          >
          > And that HTML outputted in email..so someone checks their email,they
          > have an HTMl certificate generated from a form in PHP.[/color]

          You may want to try this class that lets you compose and send HTML
          messages properly:




          --

          Regards,
          Manuel Lemos

          Free ready to use OOP components written in PHP
          Free PHP Classes and Objects 2026 Versions with PHP Example Scripts, PHP Tutorials, Download PHP Scripts, PHP articles, Remote PHP Jobs, Hire PHP Developers, PHP Book Reviews, PHP Language OOP Materials


          Comment

          Working...