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.

All outgoing email via SendGrid question

Discussion in 'E-mail Discussions' started by jonh, Jan 24, 2017.

  1. jonh

    jonh Well-Known Member

    Joined:
    Feb 15, 2016
    Messages:
    55
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    NY
    cPanel Access Level:
    Root Administrator
    I've implemented SendGrid for Exim using this doc:
    Exim 4 configuration for SendGrid - SendGrid Documentation | SendGrid

    The issue is that mail that I send from OutLook is routed through SendGrid but any mail send from website forms from sites on the server are not routing through SendGrid. The emails from the website forms are still being sent, but from the server and not SendGrid.

    I need all outgoing mail going through SendGrid.
     
  2. webhostuk

    webhostuk Well-Known Member

    Joined:
    Sep 11, 2013
    Messages:
    112
    Likes Received:
    11
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    When you send email via website form I guess you are using phpmail function from the server to send email, this something you will have to make changes in website form setting.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  4. jonh

    jonh Well-Known Member

    Joined:
    Feb 15, 2016
    Messages:
    55
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    NY
    cPanel Access Level:
    Root Administrator
    Can I just tell php to use exim for sending mail?
     
  5. jonh

    jonh Well-Known Member

    Joined:
    Feb 15, 2016
    Messages:
    55
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    NY
    cPanel Access Level:
    Root Administrator
    Looking for a server wide setting.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You could modify your PHP scripts to use SMTP authentication for sending emails instead of using the PHP mail function. This would require you to make changes to each PHP script. Otherwise, you'd have to try the changes referenced in the URL from my previous response.

    Thank you.
     
  7. webhostuk

    webhostuk Well-Known Member

    Joined:
    Sep 11, 2013
    Messages:
    112
    Likes Received:
    11
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    Right this will need coding changes in your form.
     
  8. jonh

    jonh Well-Known Member

    Joined:
    Feb 15, 2016
    Messages:
    55
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    NY
    cPanel Access Level:
    Root Administrator
    Is PHPMailer something that may help in this situation? Can PHPMailer be setup on cPanel so ALL outgoing mail has to go through the SMTP settings setup in PHPMailer?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    I don't believe this would address the issue you are facing. It seems like you are looking to a solution to replace the default behavior of the PHP mail function, similar to what's asked on the following third-party URL:

    Rackspace Community

    One alternative to consider is to disable the PHP mail function completely, and require your users to update their scripts to use SMTP authentication.

    Thank you.
     
  10. james1985

    james1985 Member

    Joined:
    Sep 24, 2016
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Barry
    cPanel Access Level:
    Root Administrator
    I have a question as we are looking to implant sendgrid as an outgoing server setting.

    Do you need to whitelist every domain you setup in Cpanel on your sendgrid account?

    Is it also possible to add an spf record to the Cpanel accounts to verify sending?
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

Share This Page