There are several forum posts, articles, and help from bluehost attempting to explain how to get the default address on Bluehost to send to something besides user@***.bluehost.com when using CForms II plugin for WordPress. However, I had no success with following them. They all seem pretty out of date and are lacking in specific instructions. So, I’m not trying to beat a dead horse here, I’m just trying to sum up exactly what I did that gave me success (after 3 days of trying). My method focuses on using the php.ini approach. Further, I’m using an approach that allows a different email address to be specified for various multiple domains on the same Bluehost account.
- Using cPanel, go to PHP Configuration under the “software/services” section. There you will see 3 options: PHP5, PHP5 (Single php.ini), and PHP5 (FastCGI). If you are going to be using multiple domains in a single Bluehost account, make sure the first option is selected. If you are only using one domain on Bluehost or you want to use one setting to handle all of your domains, select the second option.
- In the same PHP Configuration panel, under the install default php.ini section, select to include IonCube & SourceGuardian
- Click on install php.ini master file. If the file already exists, it will give you an error. That’s fine, we can use the newly generated file or an existing file.
- Using either the file manager, your ftp program, or SSH, navigate to the root of public_html and make a copy of php.ini.default named php.ini
- If you selected the first option in #1 above, copy that php.ini file into the root of your cforms plugin directory. If you selected the second option, leave that file where it is.
- Edit the newly created php.ini file by doing a text search for sendmail_path and replacing the entire line with something similar to the following:
sendmail_path = /usr/sbin/sendmail -t -i -f '"User Frienldy Name" <email@example.com>'
(note: you are allowed to use a Friendly Name, which isn’t something I could find in any other documentation. I was just experimenting and found out it worked for me.)
- Create a file named info.php and place it at the same directory as your php.ini file. In the info.php file, simply include the following php:
<?php phpinfo(); ?>
- View that page by visiting the correct path in your browser, whether it be yourdomain.com/info.php or if it be yourdomain.com/contents/plugins/cforms/info.php
- Verify that the “Loaded Configuration File” option is showing the directory you placed your php.ini file in. If it shows /etc as part of your location, something is not right. Repeat steps 1-8 until that shows up.
- Also using cPanel, go into the Email Accounts settings under the “Mail” section. Add firstname.lastname@example.org as a valid Bluehost email address.
(note: this does NOT have to be email@example.com, it can be anything as long as this matches what you placed in your php.ini file and you use the domain associated with Bluehost. Without this account, none of the settings above will work.)
- Test your CForm to make sure it gets emailed correctly.
That’s about it. I hope this helps you. If so, leave a comment below.