Hi All,
I am trying to send an email thru vb . But whenever I try to change the smtp name to smtp.gmail.com then an error iccurs (Must issue STARTTLS command first bla bla..) can anyone plz help me.
My code is as follows:
With poSendMail
.SMTPHostValida tion = VALIDATE_NONE ' Added to remove msgs that appear inj otlook
.EmailAddressVa lidation = VALIDATE_SYNTAX ' Added to remove msgs that appear inj otlook
.Delimiter = "," ' Set any delimiter
.SMTPHost = "smtp.gmail.com "
.From = "XYZ@gmail. com"
.Password = "197400"
.FromDisplayNam e = " "
.Recipient = strMailAddress
.RecipientDispl ayName = "XXX"
.CcRecipient = ""
.CcDisplayName = ""
.BccRecipient = ""
.ReplyToAddress = ""
.Subject = "Test Mail"
.Message = "Testing to send mail thru Visual Basic Application"
' .Attachment = ""
.MaxRecipients = totMailAddress + 30
.send
End With
I am trying to send an email thru vb . But whenever I try to change the smtp name to smtp.gmail.com then an error iccurs (Must issue STARTTLS command first bla bla..) can anyone plz help me.
My code is as follows:
With poSendMail
.SMTPHostValida tion = VALIDATE_NONE ' Added to remove msgs that appear inj otlook
.EmailAddressVa lidation = VALIDATE_SYNTAX ' Added to remove msgs that appear inj otlook
.Delimiter = "," ' Set any delimiter
.SMTPHost = "smtp.gmail.com "
.From = "XYZ@gmail. com"
.Password = "197400"
.FromDisplayNam e = " "
.Recipient = strMailAddress
.RecipientDispl ayName = "XXX"
.CcRecipient = ""
.CcDisplayName = ""
.BccRecipient = ""
.ReplyToAddress = ""
.Subject = "Test Mail"
.Message = "Testing to send mail thru Visual Basic Application"
' .Attachment = ""
.MaxRecipients = totMailAddress + 30
.send
End With
Comment