How do i configure my website to use SMTP emails?

Admin > Configs > General has ‘Site E-mail’ configuration. All emails from the website are sent from this email id. By default emails are sent using php ‘sendmail’. SMTP is a more secure method of sending emails where email account is authenticated during email sending.

 

SMTP must be supported on your hosting account before you can configure the smtp email sending. SMTP can be setup as a PEAR library module. You can enable smtp emailing from Admin > Configs > Advanced Configs page.  

 

 

Check the checkbox ‘Send emails through smtp’
Enter password of the site email
Enter SMTP port of your mail server
Enter the hostname of your mail server

 

Click ‘Submit’ button at the bottom of the page.

After settings are saved, click on the ‘Test SMTP’ link which is next to ‘SMTP Hosting’ input field.

Enter your email id(any email you own) and click ‘Send Email’. You must get a success message and email must arrive in your email account.

 

Troubleshooting:

 

‘Error: PEAR libraries required for SMTP are not found. Please check with your hosting provider.’ - You can check with your hosting provider regarding adding PEAR libraries.

 

On some servers PEAR is available but not accessible to your website code by default. If it is cPanel based hosting, you can look for ‘PEAR’ in cpanel. You may have to include PEAR using php.ini file or from a common php file on your website.

 

To include pear library from php.ini file:

 

Add this line to php.ini file(this may be php5.ini for some hosting)

 

include_path=".:/home/username/php"

 

Note: Here the username has to be replaced with your hosting account username. This is for reference only, you have to get the correct path and use it.

 

To include pear library from php file:

 

Add this line to the beginning of includes/functions.inc.php

set_include_path(get_include_path() . PATH_SEPARATOR . “path_to_pear”);

 

Here ‘path_to_pear’ must be replaced with the actual path.

 

On some servers PEAR is available and accessible to php code but Mail related packages are not installed. From cPanel you may be able to install these packages. These packages are required for smtp email to work.

 

Mail

Mail_Mime

Net_SMTP

 

if hosting provider doesn’t support PEAR libraries, it is also possible to manually install it.

 

Installing a local PEAR copy on shared server

 

Go to http://pear.php.net/go-pear.

Copy the script on the page, and then paste it into a new text document.

Save the new file as go-pear.php.

Upload the file to the root level of your hosting account.

Using an Internet browser, locate the file. For example, go to http://coolexample.com/go-pear.php, where coolexample.com is your domain name.

Follow the displayed instructions.

NOTE: This installer creates an index.php in the root and overwrites any existing index.php files. To avoid accidental overwrite, you can temporarily rename the current index.php before running the go-pear.php script.

 

Once the installation completes, update the php5.ini file with include_path. Which path you use depends on your hosting account.

 

Create a directory for the PEAR admin, and then password protect it.

Move the index.php that the PEAR installer created to the new directory. The directory is the path for your PEAR admin.

After installing PEAR, you can install modules by going to the PEAR admin at coolexample.com/pearadmin, where coolexample.com is your domain name.

Now restore your original index.php file.


For further help refer: http://pear.php.net/index.php

  • Email, SSL
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Will i get full source code of the script when i purchase WTK Network Software?

Yes. Except license file all other files are clear text. License file is encoded using ioncube.

How to configure cron jobs?

There are different approaches to configuring cron jobs. This depends on your hosting. Normally...

How to make my website https?

To use the ssl protocol you must first purchase SSL certificate and install on your hosting...

Redirect website to www

To always redirect website to http://www.example.com even if http://example.com is typed, Add the...

Powered by WHMCompleteSolution