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!

All outgoing email via SendGrid question

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

  1. jonh

    jonh Well-Known Member

    Joined:
    Feb 15, 2016
    Messages:
    59
    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:
    142
    Likes Received:
    14
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Website Owner
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. jonh

    jonh Well-Known Member

    Joined:
    Feb 15, 2016
    Messages:
    59
    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:
    59
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    NY
    cPanel Access Level:
    Root Administrator
    Looking for a server wide setting.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. webhostuk

    webhostuk Well-Known Member

    Joined:
    Sep 11, 2013
    Messages:
    142
    Likes Received:
    14
    Trophy Points:
    18
    Location:
    UK
    cPanel Access Level:
    Website Owner
    Twitter:
    Right this will need coding changes in your form.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. jonh

    jonh Well-Known Member

    Joined:
    Feb 15, 2016
    Messages:
    59
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. james1985

    james1985 Member

    Joined:
    Sep 24, 2016
    Messages:
    15
    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 Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,214
    Likes Received:
    1,937
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice