K
K
Khurshed Abdujalil2018-09-12 13:15:29
Yii
Khurshed Abdujalil, 2018-09-12 13:15:29

How to set return-path when sending email?

Letters are sent through the built-in library swiftmailer
added ->setReturnPath(Yii::$app->params['email'])
But I don't see this email in the headers of the received letter, more precisely, it's empty where the return-path is configured on the server or all the same through script can be set? Or does Exim remove it on send?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-09-12
@webinar

1. And why did you decide that the matter is in swiftmailer or in its setReturnPath method? The first thing I would pay attention to is Yii::$app->params['email'], most likely it is empty there.
2. Would you show the full send code. Just in case.
stop, use it instead . Since it returns a MessageInterface , and it does not have a setReturnPath method
. I think You have error output turned off otherwise you would have received it and not wasted so much time looking for a problem.
Yii::$app->mailer->compose()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question