Separated SMTP authentication code from mailR function