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.

email from website forms doesn't reach desdinations

Discussion in 'E-mail Discussions' started by SoftDux, Sep 29, 2008.

  1. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Hi,

    I have a few client who makes use of the CGI FormMail clone, as well as Joomla websites which makes use of the phpmail() function to send out emails.

    Any emails on their forms, send to email addresses on their accounts doesn't reach them, yet when I test the forms and make it send an email to my gmail email address, it works.

    There's no spam filters or Boxtrappers setup for these accounts, yet they never get the emails. How do I debug this?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Many servers (including many running cPanel/WHM) perform sender verification. This means if the email "from" address isn't a valid email account, the mail is immediately rejected.

    This would be a good place to troubleshoot, to ensure that your script isn't generating messages from a non-existent email address.
     
  3. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    ok, cool, this seems to be the problem. In the mail logs, I can see that email is coming from {username}@{servername}, and I do have sender verification enabled.

    So, how can I use FormMailClone with in such an environment?
     
  4. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Hi David,

    How can I allow users on the server to use the phpmail() function, if the sender verification option is enabled in WHM?
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The FormMail Clone, like FormMail, allows you to set the return address:

    http://www.scriptarchive.com/readme/formmail.html#email
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Using PHP's mail() function isn't the ideal way of sending mail in PHP. Ideal practice for sending mail in PHP is to send it via a SMTP connection.

    Nevertheless, the PHP documentation does indicate you can change the from field of an email:

    http://us.php.net/manual/en/function.mail.php
     
  7. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
  8. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Hi David,

    Although what you're saying is true, it's not really viable. Joomla / Drupal / SMF / etc are all scripts written by 3rd parties, and as such it's going to be impossible to change their scripts.

    Instead, I need to change the server since it's affecting a lot of users. So, what can I do to allow their emails to go through?
     
  9. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Almost all modern PHP scripts (including Joomla and Drupal) have the ability to send mail via SMTP. I haven't used SMF in a few years, so my memory is vague if they support SMTP as well. It's a fairly common capability and setting within contemporary PHP scripts.
     
  10. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    To quote the documentation for the Email field (see URL):

    "This form field will allow the user to specify their return e-mail address."
     
  11. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Thank you David. This doesn't help at all. If I cannot modify the server to allow email without SMTP then it doesn't help.

    And the field you're referring to is for the sender to put in his email address, it does nothing to the "verify sender" problem. Emails are still being generated from {user}@{server.name} and then get rejected by the server's stupid spam rules. I guess the only way forward, is to go backward and disable this dumb rule in WHM
     
Loading...

Share This Page