My SMTP Configuration

My C# Code
public void SendMail(string strCC, string strBCC, string strBody)
{
try
{
/*** Get the host settings information***/
System.Collections.Generic.Dictionary<string, string> hostSettings = DotNetNuke.Entities.Controllers.HostController.Instance.GetSettingsDictionary();
/*** Set the SMTP server details ***/
string strSMTP = hostSettings["SMTPServer"];
string strFrom = hostSettings["HostEmail"];
string EMailID = "mymail@gmail.com";
string Subject = "Test Mail";
/*** This is the actual built in function from DNN Framework. ***/
DotNetNuke.Services.Mail.Mail.SendMail(strFrom, EMailID, strCC, strBCC, DotNetNuke.Services.Mail.MailPriority.Normal, Subject, DotNetNuke.Services.Mail.MailFormat.Html, System.Text.Encoding.UTF8, strBody, "",
strSMTP, hostSettings["SMTPAuthentication"], hostSettings["SMTPUsername"], hostSettings["SMTPPassword"]);
}
catch (Exception ex)
{
Exceptions.LogException(ex);
}
}
I am getting below error
InnerException:The SMTP server requires a secure connection or the client was not authenticated. The server response was: SMTP authentication is required.
Message:
System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: SMTP authentication is required. at System.Net.Mail.RecipientCommand.CheckResponse(SmtpStatusCode statusCode, String response) at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception) at System.Net.Mail.SmtpClient.Send(MailMessage message) at DotNetNuke.Services.Mail.Mail.SendMailInternal(MailMessage mailMessage, String subject, String body, MailPriority priority, MailFormat bodyFormat, Encoding bodyEncoding, IEnumerable`1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL)
Source:
Server Name: grass