M
M
montray2019-07-01 19:47:07
PHP
montray, 2019-07-01 19:47:07

What is the easiest way to recompile and send a copy of the letter?

Hello.
It is necessary to accept all incoming messages to a certain server (done through the postfix'a hook), and send these messages further according to certain logic.
Now I'm trying this: the message is parsed using ZBateson\MailMimeParser and rebuilt using SwiftMailer. But the problem is that often (almost always) the letter is assembled crookedly (apparently, somewhere I mess with mime-parts) - then the markup goes, then pictures are not displayed, etc.
Actually a question: in what there can be a reason of this "crookedness"? Or perhaps there is an easier way to send a copy of the letter? After all, in fact, you only need to replace the addressee and the sender.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Derepko, 2019-07-01
@xEpozZ

Most likely you change the encoding and the characters are "eaten". Parse one "broken" letter. Look at the charset in the html tags, and then at the encoding of your message (not the tag, but the encoding of the original text of the letter itself). I think this is the problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question