Results 1 to 5 of 5

Thread: PDF attachment to email.

  1. #1
    Join Date
    Apr 2008
    Location
    Little Office!
    Posts
    80
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default PDF attachment to email.

    well,

    we are using a online script to send out emails and pdf attachment... the problem is that email looks cool in gmail.com and but not in MS outlook.

    HTML Code:
    Content-Type: text/html; charset="iso-8859-1"
    
    Content-Transfer-Encoding: 7bit
    
    
    This is some text <br /><br />Request For Approval 
    we also recieve a .txt attachment with the following content init

    HTML Code:
    Content-Type: image/jpg; name="filename.pdf"
    
    Content-Transfer-Encoding: base64
    
    Content-disposition: attachment; file="filename.pdf"
    
    
    
    JVBERi0xLjMKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291cmNlcyAy
    
    IDAgUgovQ29udGVudHMgNCAwIFI+PgplbmRvYmoKNCAwIG9iago8PC9GaWx0ZXIgL0ZsYXRlRGVj
    
    b2RlIC9MZW5ndGggMTU3Pj4Kc3RyZWFtCnicTY5BDoJADEX3nOIvdVPagRFdatREd5q5AEFEiSMg
    
    oNd3BoyadvPb9L0q7AMmneAVrAzCrUDFxAxzxsYEDUSzj75EFGnGOJjp2IfMItwJ1hUO/l4rmsdI
    
    JKHIIU6YHPOmz9sOy7p+VM/0NoUpPXhwKQj/XMMogpP86f2eUeDL1kpoMbK7y7WF67J3ghRZZW1+
    
    7+ijcA+9ATanNF4KZW5kc3RyZWFtCmVuZG9iagoxIDAgb2JqCjw8L1R5cGUgL1BhZ2VzCi9LaWRz
    
    IFszIDAgUiBdCi9Db3VudCAxCi9NZWRpYUJveCBbMCAwIDYxMi4wMCA3OTIuMDBdCj4+CmVuZG9i
    
    ago1IDAgb2JqCjw8L1R5cGUgL0ZvbnQKL0Jhc2VGb250IC9UaW1lcy1Cb2xkCi9TdWJ0eXBlIC9U
    
    eXBlMQovRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGluZwo+PgplbmRvYmoKNiAwIG9iago8PC9UeXBl
    
    IC9Gb250Ci9CYXNlRm9udCAvQ291cmllci1PYmxpcXVlCi9TdWJ0eXBlIC9UeXBlMQovRW5jb2Rp
    
    bmcgL1dpbkFuc2lFbmNvZGluZwo+PgplbmRvYmoKNyAwIG9iago8PC9UeXBlIC9Gb250Ci9CYXNl
    
    Rm9udCAvSGVsdmV0aWNhCi9TdWJ0eXBlIC9UeXBlMQovRW5jb2RpbmcgL1dpbkFuc2lFbmNvZGlu
    
    Zwo+PgplbmRvYmoKOCAwIG9iago8PC9UeXBlIC9YT2JqZWN0Ci9TdWJ0eXBlIC9JbWFnZQovV2lk
    
    dGggMjAwCi9IZWlnaHQgMTUwCi9Db2xvclNwYWNlIC9EZXZpY2VSR0IKL0JpdHNQZXJDb21wb25l
    
    bnQgOAovRmlsdGVyIC9EQ1REZWNvZGUKL0xlbmd0aCA5MzgzPj4Kc3RyZWFtCv/Y/+AAEEpGSUYA
    
    AQIAAGQAZAAA/+wAEUR1Y2t5AAEABAAAAGQAAP/uAA5BZG9iZQBkwAAAAAH/2wCEAAEBAQEBAQEB
    
    AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQECAgICAgICAgICAgMDAwMDAwMDAwMB
    Thanks in advance.

  2. #2
    Join Date
    Mar 2010
    Posts
    28
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Smile

    http://www.smipple.net/snippet/IanLewis/Send , multi-part encoded mail with attachments


    If you read this link, you will get best help on what you need.

    Please be focused on if you want the attachment to display inline or as an attachment.

  3. #3
    Join Date
    Apr 2008
    Location
    Little Office!
    Posts
    80
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    well,

    the above link gives a 404 error.

  4. #4
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Full link:
    http://www.smipple.net/snippet/IanLe...%20attachments. it needs the period at the end of the address as well
    Corrections to my coding/thoughts welcome.

  5. #5
    Join Date
    Apr 2010
    Location
    Internet
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You can as well check PHP Mailer, this is open source php class for sending emails (attachments, SMTP, html emails, etc.) You'll find it on Sourceforge.

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
  •