Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ronald_edelschaap's avatar

Set default Return-Path header for sendmail

Hi everyone, I got a quick question about setting a default Return-Path header when using sendmail.

The hosting provider we often use requires this header to be set to a valid, existing email address. I can set a default from name and email address in config/env, but did not find any way to do this for the Return-Path header.

I've looked into the Mail files Laravel uses, but couldn't find a way to implement a callback that runs for each email sent through sendmail (or through Mail::send). Can anynone give me a hint where to start?

Best Regards, Ronald

0 likes
0 replies

Please or to participate in this conversation.