magento2: Return path e-mail variable system/smtp/return_path_email not used anywhere?

Trying to configure the return path e-mail as described on https://docs.nexcess.net/article/how-to-set-the-return-path-email-in-magento-2.html on Magento CE 2.1.0 but failing to do so.

I can see that both system/smtp/set_return_path and system/smtp/return_path_email are configured correctly in my core_config_data table but when I look for these variables in the source I don’t seem them used anywhere. The only references I could find for return_path_email are these:

vendor/magento/module-email/Model/Template.php:    const XML_PATH_SENDING_RETURN_PATH_EMAIL = 'system/smtp/return_path_email';
vendor/magento/module-backend/etc/adminhtml/system.xml:                <field id="return_path_email" translate="label" type="text" sortOrder="80" showInDefault="1" showInWebsite="0" showInStore="0">

Const XML_PATH_SENDING_RETURN_PATH_EMAIL doesn’t seem to be used anywhere either. Could someone please confirm that these settings are in fact used in Magento CE 2.1.0 & if so point me to the correct file for debugging?

Preconditions

  1. Magento CE 2.1.0 on Debian jessie

Steps to reproduce

  1. Configure return path as described on https://docs.nexcess.net/article/how-to-set-the-return-path-email-in-magento-2.html
  2. Place order

Expected result

  1. Return path being set correctly

Actual result

  1. Return path remains www-data@domainname.com

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 48 (21 by maintainers)

Commits related to this issue

Most upvoted comments

Looking forward to celebrate the five year anniversary of an issue that should have been a simple fix for an essential core feature because what? We’re still waiting until migration from legacy ZF1 to legacy ZF2 is done?

Oh boy…

Same here. To my mind this is an important issue ! Many store are sending mails that are classified as spam without knowing it…

I agree with @dooblem I can’t see any reason why it should be removed. Having www-data@yourserver as your Return-Path in your email header makes it pretty certain it will be classified as spam by the majority of email providers. Issue still persists in 2.1.3