In order for you to use the SMTP option in Joomla! on your local installation, you will need an SMTP service installed on that PC listening to port 25 (or whatever port you assign).
If you do not have an SMTP service running on your PC (which you likely do not), you can change:
public $mailer = 'smtp';
public $mailer = 'mail';
This will set your Joomla! installation to use the PHP mailer (which you already have if you're running Joomla! locally). You can leave all of your other SMTP settings intact as they will not be used. Once you are ready to push the site to the web server, you can change
mail back to
If you need to test SMTP functionality while running the J! site locally, you will need to obtain the IP address of the web server running your SMTP service. So, if your web server's IP address is
184.108.40.206, then you would change:
public $smtphost = 'localhost';
public $smtphost = '220.127.116.11';
This will ensure that your PC is talking to the mail/web server instead of your local PC when it comes time to send messages. These same settings will work no matter the location of your J! site as the site will always be talking to the same server.
If the settings in your post work for ANY server, then I would abandon that server immediately! Since it does not require authorization to send (
public $smtpauth = '0';), anyone with the IP address of your server will be able to send unlimited numbers of SPAM messages. If this is actually the case, moving to an SMTP service like Amazon SES may be your best bet (they have a large free tier).