Answer the question
In order to leave comments, you need to log in
Why does the text disappear somewhere when sending a letter via PHP with three attachments and text?
I'm trying to send an email with text and three attachments via sockets. However, only attachments come in, the text is ignored. here is the body of the letter:
Subject: =?utf-8?Q?some_encoded_nice subject
From: =?utf8?Q?Sender name encoded?= <[email protected]>
X-Mailer: FR-konsalt WEB mailer
To: =?utf8?Q?= <[email protected]>
MIME-Version: 1.0
Content-type: multipart/mixed; boundary="frkonsaltboundary"
--frkonsaltboundary
Content-type: text/html; charset="utf8"
Content-Transfer-Encoding: base64
some text encoded by base64
--frkonsaltboundary
Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation; name="Наша презентация.pptx"
Content-Transfer-Encoding:base64
Content-Disposition:attachment
file encoded by base64
--frkonsaltboundary
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; name="Официальное положение.docx"
Content-Transfer-Encoding:base64
Content-Disposition:attachment
file encoded by base64
--frkonsaltboundary
Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document; name="Список документов.docx"
Content-Transfer-Encoding:base64
Content-Disposition:attachment
file encoded by base64
frkonsaltboundary--
Answer the question
In order to leave comments, you need to log in
The solution turned out to be that before the first boundary it was necessary to put an empty string
Why not use some ready-made component for sending mail? like SwiftMailer from Symfony 2.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question