mail

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rick

    mail

    Is there a way to use these two types of coding in the Mail function of PHP?

    Thanks for any help you can give it is most appreciated!!

    money_format('% i', $total)

    and

    print " <tr class=orderpage > \n";
    print " <td align=center>$C SQTY</td>\n";
    print " <td>COLD SORES</td>\n";
    print " <td>\$20.00</td>\n";
    print " <td>&nbsp;</td>\n";
    print " <td>\$$CST</td>\n";
    print " </tr>\n";



  • TekWiz

    #2
    Re: mail

    Rick wrote:[color=blue]
    > Is there a way to use these two types of coding in the Mail function of PHP?
    >
    > Thanks for any help you can give it is most appreciated!!
    >
    > money_format('% i', $total)
    >
    > and
    >
    > print " <tr class=orderpage > \n";
    > print " <td align=center>$C SQTY</td>\n";
    > print " <td>COLD SORES</td>\n";
    > print " <td>\$20.00</td>\n";
    > print " <td>&nbsp;</td>\n";
    > print " <td>\$$CST</td>\n";
    > print " </tr>\n";
    >
    >
    >[/color]

    I'm not sure I understand your question, but I think this may answer it...

    When mail() executes, it simply uses parameters to write the "source
    code" for an email and sends that (in some fashion) to the sendmail
    program on the server; so, if you want to have HTML in your message,
    simply include HTML code in the string $message that you put into the
    mail() function.

    If your question is about putting dynamic PHP code into an email. This
    is impossible unless a clients computer is specifically set up to
    execute PHP code from emails, and I don't know of anyone who does this.
    Email can only be static text/html code.

    It is possible to have JScript and Java, but these are MAJOR security
    concerns and most people now have these functions turned off. Outlook
    Express and Firefox both install default with JScript and Java turned off.

    FYI, here is the documentation for the mail function from the PHP manual.

    bool mail ( string to, string subject, string message [, string
    additional_head ers [, string additional_para meters]] )

    Let me know if this didn't answer your question.

    --TekWiz

    Comment

    • Rick

      #3
      Re: mail


      "TekWiz" <tekwiz@twarlic k.net> wrote in message
      news:d1i9jj$8cn $1@aunews.duc.a uburn.edu...[color=blue]
      > Rick wrote:[color=green]
      >> Is there a way to use these two types of coding in the Mail function of
      >> PHP?
      >>
      >> Thanks for any help you can give it is most appreciated!!
      >>
      >> money_format('% i', $total)
      >>
      >> and
      >>
      >> print " <tr class=orderpage > \n";
      >> print " <td align=center>$C SQTY</td>\n";
      >> print " <td>COLD SORES</td>\n";
      >> print " <td>\$20.00</td>\n";
      >> print " <td>&nbsp;</td>\n";
      >> print " <td>\$$CST</td>\n";
      >> print " </tr>\n";
      >>
      >>
      >>[/color]
      >
      > I'm not sure I understand your question, but I think this may answer it...
      >
      > When mail() executes, it simply uses parameters to write the "source code"
      > for an email and sends that (in some fashion) to the sendmail program on
      > the server; so, if you want to have HTML in your message, simply include
      > HTML code in the string $message that you put into the mail() function.
      >
      > If your question is about putting dynamic PHP code into an email. This is
      > impossible unless a clients computer is specifically set up to execute PHP
      > code from emails, and I don't know of anyone who does this. Email can only
      > be static text/html code.
      >
      > It is possible to have JScript and Java, but these are MAJOR security
      > concerns and most people now have these functions turned off. Outlook
      > Express and Firefox both install default with JScript and Java turned off.
      >
      > FYI, here is the documentation for the mail function from the PHP manual.
      >
      > bool mail ( string to, string subject, string message [, string
      > additional_head ers [, string additional_para meters]] )
      >
      > Let me know if this didn't answer your question.
      >
      > --TekWiz[/color]


      No I am sorry I must not have been clear.

      Here is what I want. The code on my web server would be

      money_format('% i', $total)

      or

      print " <tr class=orderpage > \n";
      print " <td align=center>$C SQTY</td>\n";
      print " <td>COLD SORES</td>\n";
      print " <td>\$20.00</td>\n";
      print " <td>&nbsp;</td>\n";
      print " <td>\$$CST</td>\n";
      print " </tr>\n";

      but when the email comes in to the client it would look like this

      65.25

      or

      <tr class=orderpage >
      <td align=center>15 </td>
      <td>COLD SORES</td>
      <td>$20.00</td>
      <td>&nbsp;</td>
      <td>46.25</td>
      </tr>


      Comment

      • Steve

        #4
        Re: mail

        Rick wrote:[color=blue]
        > "TekWiz" <tekwiz@twarlic k.net> wrote in message
        > news:d1i9jj$8cn $1@aunews.duc.a uburn.edu...
        >[color=green]
        >>Rick wrote:
        >>[color=darkred]
        >>>Is there a way to use these two types of coding in the Mail function of
        >>>PHP?
        >>>
        >>> Thanks for any help you can give it is most appreciated!!
        >>>
        >>> money_format('% i', $total)
        >>>
        >>>and
        >>>
        >>>print " <tr class=orderpage > \n";
        >>>print " <td align=center>$C SQTY</td>\n";
        >>>print " <td>COLD SORES</td>\n";
        >>>print " <td>\$20.00</td>\n";
        >>>print " <td>&nbsp;</td>\n";
        >>>print " <td>\$$CST</td>\n";
        >>>print " </tr>\n";
        >>>
        >>>
        >>>[/color]
        >>
        >>I'm not sure I understand your question, but I think this may answer it...
        >>
        >>When mail() executes, it simply uses parameters to write the "source code"
        >>for an email and sends that (in some fashion) to the sendmail program on
        >>the server; so, if you want to have HTML in your message, simply include
        >>HTML code in the string $message that you put into the mail() function.
        >>
        >>If your question is about putting dynamic PHP code into an email. This is
        >>impossible unless a clients computer is specifically set up to execute PHP
        >>code from emails, and I don't know of anyone who does this. Email can only
        >>be static text/html code.
        >>
        >>It is possible to have JScript and Java, but these are MAJOR security
        >>concerns and most people now have these functions turned off. Outlook
        >>Express and Firefox both install default with JScript and Java turned off.
        >>
        >>FYI, here is the documentation for the mail function from the PHP manual.
        >>
        >>bool mail ( string to, string subject, string message [, string
        >>additional_he aders [, string additional_para meters]] )
        >>
        >>Let me know if this didn't answer your question.
        >>
        >>--TekWiz[/color]
        >
        >
        >
        > No I am sorry I must not have been clear.
        >
        > Here is what I want. The code on my web server would be
        >
        > money_format('% i', $total)
        >
        > or
        >
        > print " <tr class=orderpage > \n";
        > print " <td align=center>$C SQTY</td>\n";
        > print " <td>COLD SORES</td>\n";
        > print " <td>\$20.00</td>\n";
        > print " <td>&nbsp;</td>\n";
        > print " <td>\$$CST</td>\n";
        > print " </tr>\n";
        >
        > but when the email comes in to the client it would look like this
        >
        > 65.25
        >
        > or
        >
        > <tr class=orderpage >
        > <td align=center>15 </td>
        > <td>COLD SORES</td>
        > <td>$20.00</td>
        > <td>&nbsp;</td>
        > <td>46.25</td>
        > </tr>
        >
        >[/color]
        No, you didn't understand the answer! The body of an email is a string.
        Build it up in any way that you want and then send it using the mail()
        function. Look at '.', sprintf, and a million other manipulation
        functions to get the string built.

        Also look into how to handle sending html in an email.

        Steve

        Comment

        • Rick

          #5
          Re: mail

          [color=blue][color=green]
          >>[/color]
          > No, you didn't understand the answer! The body of an email is a string.
          > Build it up in any way that you want and then send it using the mail()
          > function. Look at '.', sprintf, and a million other manipulation functions
          > to get the string built.
          >
          > Also look into how to handle sending html in an email.
          >
          > Steve[/color]

          I appreciate the replies I figured it out.



          Thanks!!!


          Comment

          • Rick

            #6
            Re: mail

            "TekWiz" <tekwiz@twarlic k.net> wrote in message
            news:d1i9jj$8cn $1@aunews.duc.a uburn.edu...
            [color=blue]
            > I'm not sure I understand your question, but I think this may answer it...
            >
            > When mail() executes, it simply uses parameters to write the "source code"
            > for an email and sends that (in some fashion) to the sendmail program on
            > the server; so, if you want to have HTML in your message, simply include
            > HTML code in the string $message that you put into the mail() function.
            >
            > If your question is about putting dynamic PHP code into an email. This is
            > impossible unless a clients computer is specifically set up to execute PHP
            > code from emails, and I don't know of anyone who does this. Email can only
            > be static text/html code.
            >
            > It is possible to have JScript and Java, but these are MAJOR security
            > concerns and most people now have these functions turned off. Outlook
            > Express and Firefox both install default with JScript and Java turned off.
            >
            > FYI, here is the documentation for the mail function from the PHP manual.
            >
            > bool mail ( string to, string subject, string message [, string
            > additional_head ers [, string additional_para meters]] )
            >
            > Let me know if this didn't answer your question.
            >
            > --TekWiz[/color]

            Thanks very much I appreciate your help!!


            Comment

            Working...