problem in message field in mail function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sravani1
    Banned
    New Member
    • Mar 2008
    • 10

    problem in message field in mail function

    Hi,


    I used the mail function .In that message field i inserted the html code. Then received the confirmation message print directly as html code (that means print all html tags).

    plz tell what the mistake in that.
  • zorgi
    Recognized Expert Contributor
    • Mar 2008
    • 431

    #2
    To send HTML mail, the Content-type header must be set

    [PHP]
    $headers = 'MIME-Version: 1.0' ;
    $headers .= 'Content-type: text/html; charset=iso-8859-1' ;
    [/PHP]

    have you done that?

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      Originally posted by sravani1
      Hi,


      I used the mail function .In that message field i inserted the html code. Then received the confirmation message print directly as html code (that means print all html tags).

      plz tell what the mistake in that.
      As zorgi stated, you need to send headers with the html mail for it to be formatted as html.

      Also, how do you expect us to know you're error if we can't see your code?
      It helps alot.

      Regards.

      Comment

      Working...