Log in

View Full Version : PDF attachment to email.



chetanmadaan
05-16-2010, 07:45 PM
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.



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


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.

katierosy
05-18-2010, 12:28 PM
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.

chetanmadaan
05-18-2010, 06:00 PM
well,

the above link gives a 404 error.

bluewalrus
05-18-2010, 06:03 PM
Full link:
http://www.smipple.net/snippet/IanLewis/Send%20multi-part%20encoded%20mail%20with%20attachments. it needs the period at the end of the address as well

Sergey Popov
05-26-2010, 07:30 PM
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.