A
A
Anton Misyagin2018-08-02 12:46:37
Email
Anton Misyagin, 2018-08-02 12:46:37

How to attach a file to an email?

The task is to send a letter with a picture. Below is the source of the letter. Gmail and Yandex do not perceive such a letter as a letter with an attached file. What's the catch?

From: ЗАО "САНЛИТ" <[email protected]>
To: [email protected] <[email protected]>
Subject: Тема моего письма
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="----==--bc110c5b4b4cae85dc9ee5663345199e::f37cec515b9ebfdfa6b45cb7aa155e59"

----==--bc110c5b4b4cae85dc9ee5663345199e::f37cec515b9ebfdfa6b45cb7aa155e59
Content-Transfer-Encoding: 8bit
Content-Type: text/html; charset=utf-8

Сам текст<br /><br />-- <br />Отправл
----==--bc110c5b4b4cae85dc9ee5663345199e::f37cec515b9ebfdfa6b45cb7aa155e59
Content-Disposition: attachment;
        filename="smallll.jpg"
Content-Transfer-Encoding: base64
Content-Type: multipart/mixed;
        name="smallll.jpg"

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr/2wBDAQICAgICAgUDAwUKBwYHCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgr/wAARCAAUABEDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9TPF37V/7eejftyfDX4a6t+zL4P8ABvwX8WfFDW/Bba54k8UnUPFHiNoPC9/rFpqtlaWJNppti02l3cWLmea6lQxlra0JIr6wry/9p39mKD9pSDwXd2nxo8YeANb8A+MG8SeG/EngmPS5LqG6bS9Q0uRHj1SxvbeSJrXU7pSGh3BijKylefH/ANk74N6d8E/+Cknxs8PWvj7xh4ovNQ+B/wAN9R1jXfG3ii41O6vL2TWPG6yyosjeRYxOY94s7KK2soWd/It4VYrQB9YUUUUAFfP/AMOf+Upvxk/7N/8Ahp/6fPHdFFAH0BRRRQB//9k=
----==--bc110c5b4b4cae85dc9ee5663345199e::f37cec515b9ebfdfa6b45cb7aa155e59--

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Misyagin, 2018-08-02
@sunnmas

From: CJSC "SUNLIT"
To: [email protected]
Subject: Subject of my letter
MIME-Version: 1.0
Content-Type: multipart/mixed; = boundary "2e47998c27641d3fd21669b7387f19bc :: 1cb251ec0d568de6a929b520c4aed8d1"
--2e47998c27641d3fd21669b7387f19bc :: 1cb251ec0d568de6a929b520c4aed8d1
the Content-Transfer-the Encoding: 8bit
the Content-the Type: text / plain
text
--2e47998c27641d3fd21669b7387f19bc :: 1cb251ec0d568de6a929b520c4aed8d1
the Content-Disposition header: attachment; filename="smallll.jpg"
Content-Transfer-Encoding: base64
Content-Type: image/jpg; charset="utf-8"; name="smallll.jpg"
/ 9j / 4AAQSkZJRgABAQEAYABgAAD / 2wBDAAIBAQEBAQIBAQEC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Of + Upvxk / 7N / 8Ahp / 6fPHdFFAH0BRRRQB // 9k =
--2e47998c27641d3fd21669b7387f19bc::1cb251ec0d568de6a929b520c4aed8d1--

R
Rsa97, 2018-08-02
@Rsa97

You have a value for the attached file Content-Type: multipart/mixed;
That is, you say that this part of the letter itself consists of subparts.
Change toContent-Type: image/jpeg; charset="utf-8";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question