Can I create an SSL connection with Firemail?
We have a business account with google so our emails go through google servers. The SMTP address is still smtp.gmail.com and I know google uses port 465 (usually), but they also require a secure connection. Here is the code I am trying, but it fails, if I use another server such as comcast or yahoo (who don't require secure connections), it works fine.
Dim smtpServer As String = "smtp.gmail.com"
Dim smtpServerUserName As String = "service@encompass8.com"
Dim smtpServerPassword As String = "********" 'obviously not the real password
Dim message As New HtmlMessage(fromAddress, toAddress, subject, messageText)
' Create a basic authentication instance
Dim authentication As New BasicAuthentication(smtpServerUserName, smtpServerPassword)
' Create a Connection, port 465 for gmail only
Dim connection As New Connection(smtpServer, 465, authentication)
'Add attachment
Dim attachment As New HtmlContentAttachment(myfile.BuildPath(folder, filename))
message.HtmlContentAttachments.Add(attachment)
' Send the message using the created connection
message.Send(connection)