Replace default phpMailer to use another smtp server for sending

who can help me to check does below config are correct or not?
surely I have change sensitive information such as host/user/password.

# To use a SMTP server please give your server hostname here, leave it blank to use the standard
# PHP mail() command.
define('PHPMAILERHOST', '');

# in the above you can specify multiple SMTP servers like this:
# 'server1:port1;server2:port2;server3:port3' eg

# if you want to use smtp authentication when sending the email uncomment the following
# two lines and set the username and password to be the correct ones
$phpmailer_smtpuser = 'service';
#$phpmailer_smtppassword = 'abcdo';

## you can set this to send out via a different SMTP port

I would also like to know how that works