# SMTP Contact form PHP

**URL:** <https://forum.pinegrow.com/t/smtp-contact-form-php/394>\
**Category:** General\
**Created:** [November 21, 2016, 3:47am UTC](https://forum.pinegrow.com/t/smtp-contact-form-php/394 "2016-11-21T03:47:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Korba.ca](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/korba.ca/32/78_2.png) [@Korba.ca](https://forum.pinegrow.com/u/Korba.ca)\
**Post date:** [November 21, 2016, 3:47am UTC](https://forum.pinegrow.com/t/smtp-contact-form-php/394/1 "2016-11-21T03:47:56Z")

</div>

Hey there, I’m not too good with PHP, however, I’m working on my website and wanted to implement the contact form. Once having the contact form inside the website and configured with the email, I get the error of “Warning: mail() has been disabled for security reasons in”. I contacted my hosting provider and they said it’s disabled for reasons of people using it to spam emails. They asked me to use SMTP to get the form working.

I was wondering if anyone in the community knows how to get the SMTP code up and running to remove this error as I am not so great with PHP. Thanks for all the help in advance.

---

<div class="post-metadata">

**Author:** ![Terry44](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/terry44/32/175_2.png) [@Terry44](https://forum.pinegrow.com/u/Terry44)\
**Post date:** [November 21, 2016, 6:00pm UTC](https://forum.pinegrow.com/t/smtp-contact-form-php/394/2 "2016-11-21T18:00:26Z")

</div>

Here is a bing search on “PHP SMTP” the top 3 or 4 results look good.

[http://www.bing.com/search?q=php+smtp&qs=n&form=QBLH&pq=php+smtp&sc=8-7&sp=-1&sk=&cvid=8C28B79C38674882A588C066B2C92BC0](http://www.bing.com/search?q=php+smtp&qs=n&form=QBLH&pq=php+smtp&sc=8-7&sp=-1&sk=&cvid=8C28B79C38674882A588C066B2C92BC0)

  
Here is a Youtibe video search with video tutorials on how to do it.

[https://www.youtube.com/results?search\_query=php+smtp](https://www.youtube.com/results?search_query=php+smtp)

If you want to buy a book I recommend PHP/MySQL by MURACH

> **[Murach's PHP and MySQL, 2nd Edition](https://www.amazon.com/Murachs-PHP-MySQL-Joel-Murach/dp/1890774790/ref=sr_1_1?ie=UTF8&qid=1479751071&sr=8-1&keywords=PHP%2FMySQL%2Bby%2BMURACH)**
>
> 4.2 out of 5 stars,

Then there is also the PHP manual itself that goes into details on how to implement SMTP as well as coding forums and sites like stackoverflow.

> <https://stackoverflow.com/questions/14456673/sending-email-with-php-from-an-smtp-server>

.
