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

Not a Bug Contact Us Form should not send email 'from' users address

Discussion in 'Resolved Bug Reports' started by md_5, Jan 22, 2014.

  1. md_5

    md_5 Well-Known Member

    What happens here, is when we use an email services such as Amazon SES, the mail will get denied as the user's email is not a verified domain/address.
    Additionally sending emails from other domains could lead to the mail server being blacklisted.
    In Misc.php I suggest the following code:
    PHP:
                $mail->send(
                    
    XenForo_Application::get('options')->contactEmailAddress'', array(
                        
    'Sender' => XenForo_Application::get('options')->contactEmailAddress
                    
    ),
                    
    $user['email'], $user['username']
                );
    Be changed to something like:
    PHP:
                $mail->send(
                    
    XenForo_Application::get('options')->contactEmailAddress'', array(
                        
    'Sender' => XenForo_Application::get('options')->contactEmailAddress
                    
    ),
                    
    XenForo_Application::get('options')->contactEmailAddress$user['username'] . '(' $user['email'] . ')'
                
    );
    Thanks!
     
    Wulfspider and Mouth like this.
  2. hqarrse

    hqarrse Active Member

  3. Mike

    Mike XenForo Developer Staff Member

    This isn't a bug - the "Sender" header is the RFC standard for this. It indicates the technical sender while from indicates the person actually causing the email. I really don't know why SES refuses to check for the Sender header. (It's a long standing suggestion/bug on their site from what I've seen.)
     
  4. md_5

    md_5 Well-Known Member

    Sorry for the late reply, I thought I had this thread watched. What about at least having an option to use the reply to header instead, like @hqarrse suggested?
    I think having emails with the from header is a nicety that causes more issues than its worth. Additionally it cannot be solved by a core edit. What about adding an option to the mail tab to force an address for SMTP, similar to not using -f for sendmail?
     

Share This Page