SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    May 2004
    Location
    Quebec, Canada
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Encoding mail headers AND sending HTML mail?

    I'm trying to encode multi-byte characters (characters with french accents) in the subject and headers of a mail. I've tried the mb_send_mail() wrapper to the mail function but you can't seem to send HTML e-mails with it (message body shows the HTML code after encoding).

    Does anyone know of a reliable way to encode just the headers (mainly the From and To parts) and the subject of a mail, without affecting the HTML body so it shows as excpected? I've checked the PHP documentation and notes and haven't had any success with what was suggested. Thanks!

  2. #2
    SitePoint Zealot
    Join Date
    May 2004
    Location
    Quebec, Canada
    Posts
    101
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got it! I just passed the accented text to mb_encode_mimeheader(). It only encoded the parts I need and left the rest of the e-mail to be received in HTML.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •