mailman
mailman copied to clipboard
How can I change the return path before deliver the mail?
I would like to change the return path of the email. But no matter what I try:
def deliver(return_path, from, to, email) do
email = email
|> Map.put(:to, [to])
|> Map.put(:from, from)
|> Map.put(:reply_to, from)
|> Map.put(:return_path, return_path)
{:ok, send_mail} = Mailman.deliver(email, config())
end
or
def deliver(return_path, from, to, email) do
email = email
|> Map.put(:to, [to])
|> Map.put(:from, from)
|> Map.put(:reply_to, from)
|> Map.put_new(:return_path, return_path)
{:ok, send_mail} = Mailman.deliver(email, config())
end
... the return path of the outgoing email is set to the same value as the from: value.
Is there a way to change the value of the return-path?