T
T
Triglav772019-08-21 15:32:41
PHP
Triglav77, 2019-08-21 15:32:41

How to view attached pdf file in mail?

With the help of a script, I connected to the mailer and look through the letters. Everything is fine if you do not have to view the attachment in pdf format.
$text_mail = imap_body($connect_imap, $num_mail);
The bullshit will come out
IAA0AC4AOAAuADcpCi9DcmVhdGlvbkRhdGUgKEQ6MjAxOTA4MTQxMDM0MzZaKQo + PgplbmRvYmoK MyAwIG9iago8PAovVHlwZSAvRXh0R1N0YXRlCi9TQSB0cnVlCi9TTSAwLjAyCi9jYSAxLjAKL0NB IDEuMAovQUlTIGZhbHNlCi9TTWFzayAvTm9uZT4 + CmVuZG9iago0IDAgb2JqClsvUGF0dGVybiAv RGV2aWNlUkdCXQplbmRvYmoKNiAwIG9iago8PAovVHlwZSAvWE9iamVjdAovU3VidHlwZSAvSW1h Z2UKL1dpZHRoIDk3MgovSGVpZ2h0IDM4MwovQml0c1BlckNvbXBvbmVudCA4Ci9Db2xvclNwYWNl IC9EZXZpY2VHcmF5Ci9MZW5ndGggNyAwIFIKL0ZpbHRlciAvRmxhdGVEZWNvZGUKPj4Kc3RyZWFt Cnic7drbWiLbAYXRVjmDCAoiKqioeMLDTt7 / 3bKK3kkuciPuTpff3GO8QV3831yrqn78AAAAAAAA AAAAAAAAAAD45vaAb + Evh7wPfAN / pedtyAdFA6hXFeK25y + WXDJuFi2gXqXDKuiv1Lzd5Eaz1W53 Ol2gXp1Ou91qNqpt3j3lquROt9fvDwaHQI0Gg0G / 1 + v + rHnHmEvKZZO7 / cHh8Gg0Bmo1Gh0NDwdV zbvGvE250xsMR + Pjk8l0Oj0F6jKdTiYnx + Ojw36vU2Le6cq8d9AoKR8ejSfT07Oz + TlQo / n8bHY6 PRkPB1XMuwxzmeUq5dHxdDa / uFwsl8sroC7L5WJxeT6fTcZHg167ebBLywfNdkn55HR + sbi6vlmtboHarFarm + vl4nw2OR4OujsNczXL / aPj0 / nl1c3t3f16 / QDUZr2 + v79bXS8vyjIPe + 3G54d5b79R Znk8Pbu8Wt2tHx6fnp4rL8Bvtk3v + enp8eH + 9qYs88lRv7PDIbscscssn8wulqv7h6fnl81m8wrU ZbMpUT + u764v55PxYbd1sP / 5llvdwWgyX1zfPTy9bF7f3t7egbq8vZWeS8yr5fnp8bBXLsyfbXm / 0eoeHp + eL1frx5fXquOPyh / Ab7ZN76PqefP8cHt9WR2y259 / + VVdl4fliH11 + / C8eXv / d8b / AH6z / xT9 / vrydH + zOJuUlj9 / YS4tV9fly + u7MsvvHzKGelU5v22qlufT0eDzL7 + qr8v9o8nZ4ub +6WfL dT8J/L39bPm5XJh3brkzGE3n5bpcjtj/neV/Ar/Z/6Hluh8J/ra2Mf+alqUMdapi/iUtSxnqVcX8dT8J/L39bPm5XJh3brkzGE3n5bpcjtj/neV/Ar/Z/6Hluh8J/ra2Mf+alqUMdapi/iUtSxnqVcX8dT8J/L39bPm5XJh3brkzGE3n5bpcjtj/neV/Ar/Z/6Hluh8J/ra2Mf+alqUMdapi/iUtSxnqVcX8
etc.
Can this be brought into a readable form or will you have to download and parse already in the north

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Kolesnikov, 2019-08-21
@NikitOS_MV

Where are you viewing? On the page?
Try adding application/pdf to the page headers:
header('Content-Type: application/pdf');

A
Adamos, 2019-08-21
@Adamos

There over "garbage of type" the heading with the specified Content-Transfer-Encoding does not hang with a case?
https://www.php.net/manual/ru/function.base64-deco... try it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question