E
E
Evgeny Karpov2022-04-14 16:03:41
MODX
Evgeny Karpov, 2022-04-14 16:03:41

How to add service header to modx revo?

Friends help to add service heading List-Unsubscribe. I don't understand where to do it. Emails are sent from the Login plugin via phpmailer. Letters began to fall into spam at gmail and microsoft generally refuses delivery. Modx Revo

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Tarasov, 2022-04-14
@an-tar

Good question, I don't see such a direct way. Unless phpmailer itself is edited, which is no good:

$mail->AddCustomHeader("List-Unsubscribe:  <mailto:[email protected]>,<".base_url()."unsubscribe/".$unique_unsub.">")

D
Danny Arty, 2022-04-14
@DanArst

Write your email hook for Login .
Read about hooks here . Just add the following line
to your mail hook:

$this->modx->mail->header('List-Unsubscribe: <mailto:[email protected]>,<".base_url()."unsubscribe/".$unique_unsub.">');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question