Send Mail Socket with google issues

So I am getting a bug (NilObjectException) with trying to send emails via smtp.gmail.com through port 465. Using any of the SMTP services listed here did not aid in trying to send the email.

Code that is causing issues is below:

[code] dim SendMailSocket as SMTPSocket

  SendMailSocket.Address = "smtp.gmail.com" // your SMTP email server
  SendMailSocket.Port = 465 // Check your server for the property port # to use

[/code]

Ideas?

Thank you so much ladies and gents.

You have not created an instance of SendMailSocket - add New to the Dim statement.

Also you should be using SMTPSecureSocket and setting the security to TLS.