SMTP Envelope's From field vs SMTP protocol/handshake's MAIL From (was: How to set Return-Path when using ACS Commons Email API?)
Hi,
We expect the Return-Path to be set to support-websites@foo.com.
We have tried two different configurations and neither one is working. First we had:
DefaultMailService.xml
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="sling:OsgiConfig"
debug.email="{Boolean}false"
from.address="DO-NOT-REPLY@foo.com"
smtp.host="foo.com"
smtp.password=""
smtp.port="25"
smtp.ssl="{Boolean}false"
smtp.user=""/>
And email.template:
Return-Path: support-websites@foo.com
Subject: ${subject}
A form has been submitted on your website ${page} as shown below:
------------------------
${body}
-----------------------
And then we tested:
From: DO-NOT-REPLY@foo.com
Subject: ${subject}
A form has been submitted on your website ${page} as shown below:
------------------------
${body}
-----------------------
and
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="sling:OsgiConfig"
debug.email="{Boolean}false"
from.address="support-websites@foo.com"
smtp.host="foo.com.au"
smtp.password=""
smtp.port="25"
smtp.ssl="{Boolean}false"
smtp.user=""/>
But the Return-Path received by recipients stays DO-NOT-REPLY@foo.com.
Any ideas how the ACS Commons Email API should be confugured so that it sets Return-Path as support-websites@foo.com?
Thanks in advance.