SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist captainccs's Avatar
    Join Date
    Mar 2004
    Location
    Caracas, Venezuela
    Posts
    516
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    email rendering problem

    I have a script that creates and send emails. It can handle plain text and html as well as inline images and attachments but it has a rendering problem when both inline images and attachments are present - at least with Mac Mail. The problem is that the inline images are displayed twice, once in the body of the html and then as attachments.

    If there is no attachment (the pdf), just the two inline images, then the email renders properly. Mac Mail still recognized the inline images as attachments but does not render them twice.

    I'm not sure if the bug is in my code or in Mac Mail. Here is the email as received by Mac Mail (most of the header is removed).
    Code:
    MIME-Version: 1.0
    Content-Type: multipart/mixed;
        boundary="OEM_Scripts_mailer==13680974577==3"
        
        
    This is a multi-part message in MIME format.
    
    --OEM_Scripts_mailer==13680974577==3
    Content-Type: multipart/alternative;
        boundary="OEM_Scripts_mailer==13680974577==2"
    
    --OEM_Scripts_mailer==13680974577==2
    Content-Type: text/plain;
        charset="iso-8859-1";
        format=flowed
    
    {{{ text }}}
    
    --OEM_Scripts_mailer==13680974577==2
    Content-Type: multipart/related;
        boundary="OEM_Scripts_mailer==13680974577==1"
    
    --OEM_Scripts_mailer==13680974577==1
    Content-Type: text/html;
        charset="iso-8859-1"
    Content-Transfer-Encoding: quoted-printable
    
    {{{ html }}}
    
    --OEM_Scripts_mailer==13680974577==1
    Content-Transfer-Encoding: base64
    Content-Id: <iguana-170-13680974577@cardumen.com>
    Content-Type: image/jpeg;
    	name=iguana-170.jpg
    Content-Disposition: inline;
    	filename=iguana-170.jpg
    
    {{{ iguana-170.jpg }}}
    
    --OEM_Scripts_mailer==13680974577==1
    Content-Transfer-Encoding: base64
    Content-Id: <cattleya-13680974577@cardumen.com>
    Content-Type: image/jpeg;
    	name=cattleya.jpg
    Content-Disposition: inline;
    	filename=cattleya.jpg
    
    {{{ cattleya.jpg }}}
    
    --OEM_Scripts_mailer==13680974577==1--
    
    --OEM_Scripts_mailer==13680974577==2--
    
    --OEM_Scripts_mailer==13680974577==3
    Content-Transfer-Encoding: base64
    Content-Type: application/pdf;
        name="test.pdf"
    Content-Disposition: attachment;
        filename=test.pdf
    
    {{{ test.pdf }}}
    
    --OEM_Scripts_mailer==13680974577==3--
    Denny Schlesinger
    web services

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    I'm... fairly certain this is a email-client problem.

    Have you tried viewing the email in another client?
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Evangelist captainccs's Avatar
    Join Date
    Mar 2004
    Location
    Caracas, Venezuela
    Posts
    516
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StarLion View Post
    I'm... fairly certain this is a email-client problem.

    Have you tried viewing the email in another client?
    The only other client I have is Yahoo mail. It renders the body correctly but it only shows two attachments, the first inline image (it renders both in the html) and the attached pdf.

    Are there any volunteers to look at my email in various clients? If so, please send me your email address by PM. Thanks.
    Denny Schlesinger
    web services


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
  •