Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Email sent as "username@hostname"

Discussion in 'E-mail Discussions' started by DennisMidjord, May 23, 2017.

  1. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    97
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    Hi,

    We have a problem with emails. We have a few clients that receive emails from a contact form on their WP installation.
    This email is being sent to them from "user@hostname" though, and this causes issues as the mail is seen as spam.

    Here's an example:
    Customer uses Microsofts mail servers. His contact form on the website is set to send him an email on kontakt@domain.dk.
    When the email is sent, we can see the following in the header:
    Code:
    Received: from mitsuppo by pro4.example.dk with local (Exim 4.89)
    
                                 (envelope-from <mitsuppo@pro4.example.dk>)
    
                                 id 1dD9TU-001bjq-5y
    
                                 for kontakt@example.dk; Tue, 23 May 2017 15:03:44 +0200
    Is there anything we can do about this?
     
    #1 DennisMidjord, May 23, 2017
    Last edited by a moderator: May 23, 2017
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    335
    Likes Received:
    95
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    #2 rpvw, May 23, 2017
    Last edited: May 23, 2017
  3. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    97
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    Thanks for your reply.
    The client was recently on a DirectAdmin server, and he had no issues there. Is there no setting that we can change in WHM that fixes this?
     
  4. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    335
    Likes Received:
    95
    Trophy Points:
    28
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    If your users refuse to configure their wp forms to use authenticated SMTP, as I indicated, you can add the -f user@domain.tld to a mail.force_extra_parameters line in your php.ini for that domain. This is a run-time configuration and can be set per directory since PHP 5.0.0

    Please see PHP: Runtime Configuration - Manual for more information.
     
    #4 rpvw, May 23, 2017
    Last edited: May 23, 2017
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You'd need to setup WordPress to send email via SMTP to avoid the mail coming from the username@hostname address. You may find a plugin like this helpful:

    Configure SMTP

    Thank you.
     
  6. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    97
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    This actually helped - thanks! The customer doesn't want to use a plugin for SMTP. He's sure that it will make his WordPress installation run slower, and to avoid a longer argument I searched for another solution.
    I tried to convince him that SMTP would be a much more reliable solution but he didn't agree :)
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see the "-f" parameter in the PHP configuration file helped. Thank you for updating us with the outcome.
     
Loading...

Share This Page