A
A
Arthur2017-07-21 09:31:28
Calendar
Arthur, 2017-07-21 09:31:28

Incorrect encoding in email attachment and two events in one email?

Laravel 5.2
PHP7.1
I send an email Mail::send with an attached calendar event ( text/calendar attachment )
Result encoding UTF-8 and Cyrillic is present
As a result, an email arrives with the correct encoding and Cyrillic.
But here the calendar attachment comes in a crooked way
- here is the screen https://s.mail.ru/EktD/pYjPD6xw7 - note that there are two lines!
- here is the source of letters https://pastebin.com/26HzjD6i
sending is done like this

$message->attachData($mail, 'invite.ics', ['mime' => "text/calendar;" ]);

Tried to convert iconv encoding back and forth to utf8 cp1252 cp1251
Tried to specify
$message->attachData($mail, 'invite.ics', ['mime' => "text/calendar;charset=UTF-8" ]);

No results, or worse.
Tell me where to dig, are there options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artur, 2017-07-21
@astralo

removing ['mime' => "text/html"]
solved the problem ))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question