1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Relaying Disallowed on Contact Emails

Discussion in 'Troubleshooting and Problems' started by Adrian Schneider, Mar 23, 2014.

  1. Adrian Schneider

    Adrian Schneider Active Member

    When users attempt to use the contact form, the mail fails to send, with the error (real email substituted)
    I'm using Zoho for my mail, and the mail is properly configured using SMTP. Mail sends properly for standard emails (ex, activation mail). Upon a few hours of troubleshooting, I assume this is because the From header is not matching the domain.

    I've set up SPF records, as well as the domain key so Zoho is properly configured to send mail (and it is - when it's from the correct address). The server I'm on is not running a mail server, nor would I like it to be, so I'm looking for some assistance on either fixing this at the configuration level, or relying on a correct From header, and an added Reply-To header.

    For the development I have done in the past using Zend_Mail, I ran into similar problems on other mail hosts. Either spam filters would pick it up, or other hard to debug errors would occur. This led me to use a real From account, and reply-to the dynamic address instead.

    Any help would be appreciated.

  2. Mike

    Mike XenForo Developer Staff Member

    This is most likely correct. We actually follow the standard recommendation here which is to use the "Sender" header (which indicates the address initiating the email, while from indicates where the content came from). The SMTP server should really be validating on the Sender header if present and then falling back to the From header.

    The code in ControllerPublic_Misc could be tweaked to change the from and set a Reply-To if necessary.

Share This Page