Powered by eUKhost®

Announcement

Collapse
No announcement yet.

PHP Mail Function Disabled on Shared Hosting - Howtos, etc.

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP Mail Function Disabled on Shared Hosting - Howtos, etc.

    Dear customers,

    While we have had the mail() function disabled on our shared servers for a length of time, now and then the question arises as to why mail cannot be sent via their account using the basic mail() PHP function. The reason being is because, as the error details, the mail() function has been disabled because we have experienced a lot of spam and other unsolicited mail being sent and with better and more robust solutions being available to send mail, we had previously made the decision to disable the mail() function on our shared servers.

    Of course, if you have a VPS, Cloud Server or Dedicated Server with us, it is your call as to whether you want the mail() function enabled or disabled; but on our shared servers, we have to make certain decisions for the benefit of the majority of our customers where hundreds of websites are hosted on one shared server.

    While we do not offer technical support on scripting issues or assist on enquiries relating to web application code because it naturally falls out of the scope of where we reasonably need to provide technical support for, others will be happy to assist you by posting your query in our Scripting and Markup Languages forum where someone will likely be able to help you. Some of our staff members are experienced in PHP (including myself) so we'll be happy to help you where we can on scripting-related issues by posting them on our forum.

    As a courtesy to customers, we have posted a more in-depth article on our knowledgebase on sending e-mails within your PHP applications without having to use the mail() function. You can read the article here: PHP Mail Function Disabled on Shared Web Hosting

    Changing from PHP Mail to SMTP via Invision Power Board
    For any e-mails sent by Invision Power Board, you'll need to switch from using the standard mail() function to SMTP for the mail delivery method. To do this, login to your Invision Power Board administrative panel and from the System menu, select System Settings and then from the list of system settings to change, select Email Set-up. From here, change the first option Mail delivery method from PHP Mail() to SMTP. Then scroll down and enter your SMTP account details in the SMTP Set-up section. The SMTP port on our shared servers is 25, however you can absolutely make sure by going to Email Accounts from within cPanel, and from the right-hand side, select More and click Configure Email Client. From this page, you can see the SMTP port for Outgoing Mail Server (the first should display port 25 - however, the port number can be changed by the server administrator, so if you are with another web hosting provider, definitely check what the SMTP port number is - some web hosting providers may change this to something else for security reasons).

    Changing from PHP Mail to SMTP via vBulletin
    For any e-mails sent by Invision Power Board, you'll need to switch from using the standard mail() function to SMTP for the mail delivery method. To do this, login to your vBulletin administrative panel and from the Settings tab on the left, expand it by clicking on the tab itself, and select Options. From the new page on the right-side of the IFrame, select Email Options (which is just over half-way in the scroll list). On the next page, scroll down to SMTP Email and make sure the radio button Yes is selected. The SMTP port on our shared servers is 25, however you can absolutely make sure by going to Email Accounts from within cPanel, and from the right-hand side, select More and click Configure Email Client. From this page, you can see the SMTP port for Outgoing Mail Server (the first should display port 25 - however, the port number can be changed by the server administrator, so if you are with another web hosting provider, definitely check what the SMTP port number is - some web hosting providers may change this to something else for security reasons). The SMTP Secure Connection should be fine as None.

    Note: In all cases, the SMTP username and password is essentially the credentials of an Email Account that exists on your hosting account. You can create an e-mail account within cPanel, perhaps [email protected].
    Find us on Twitter and Facebook

    Need to contact us?
    Customer Support: Client Area - 0800 862 0380 (option 2)
    Customer Relations: [email protected] - 0800 862 0380 (option 3)
    Sales: [email protected] - 0800 862 0380 (option 1)




    The opinions or views expressed above are not necessarily the opinions or views of eUKhost Ltd.
ban-img
Working...
X