Hi everybody.

I'm trying to send an email with the SMTPClient through a GMail account, but I'm having the problem that once I press the Send Button, the app freezes and I'm not getting any email.

I've looked around but I found nothing that is specifically made for Gmail.

The code I'm using is this one:

Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Dim MySMTPClient As New Net.Mail.SmtpClient
        With MySMTPClient
            .Port = 465
            .Host = "smtp.gmail.com"
            .DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
            .EnableSsl = True
            .Timeout = 30
            .Credentials = New Net.NetworkCredential("[email protected]", "*****", "[email protected]")
        End With
        MySMTPClient.Send("[email protected]", "recipient.text", "Subject", "Body")
    End Sub
It hasn't got much, but I want to get the mailing part working first.

Thanks a lot ^^