SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP MIME Decoding

    Hello,
    I am building a Mailing List Web Application based on PHP, MySQL. I have the script have the ability to receive emails and then send a mass email out to a group of subscribed users. My problem is when i have it send the message back out I am unsure of how to decode the MIME encoded messages from the incoming email. I have a script where it breaks up the message body from the email and sends it but i cannot get it to decode the MIME encoded message body. Any help would be greatly appreciated!

    Thanks,
    Robert

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2006
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    decode ? what do you mean ?

    The email provides a content-encoding in the MIME header, no such thing as a "mime encoding". This header you should be able to read, and then use the correct encoding when sending the mail out again.

    Just use utf-8 for everything, solves all problems

  3. #3
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    This is a multi-part message in MIME format.
    
    ------=_NextPart_000_003F_01C6EE15.B520FE00
    Content-Type: text/plain;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    
    How can i decode tihs
    ------=_NextPart_000_003F_01C6EE15.B520FE00
    Content-Type: text/html;
    charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META http-equiv=3DContent-Type content=3D"text/html; =
    charset=3Diso-8859-1">
    <META content=3D"MSHTML 6.00.2800.1505" name=3DGENERATOR>
    <STYLE></STYLE>
    </HEAD>
    <BODY bgColor=3D#ffffff>
    <DIV><FONT face=3DArial size=3D2>How can i decode =
    tihs</FONT></DIV></BODY></HTML>
    
    ------=_NextPart_000_003F_01C6EE15.B520FE00--

    that is what shows up when the email is sent through the list

  4. #4
    SitePoint Addict
    Join Date
    Sep 2004
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out PEAR's Mail_MimeDecode class. Im using on a project and it seems to work just fine.

  5. #5
    SitePoint Member
    Join Date
    Nov 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ok thanks ill look into that


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
  •