I have a program that I want to generate an email....someway. I have tried using gmail, but it keeps erroring. does anybody know a way for me to be able to generate an email? Any help would be great...here is my code that i have from the gmail....it didnt work.

        'Sending the email
        Dim mail As New MailMessage()

        'set the addresses
        mail.From = New MailAddress("plagarism.notify.upb@gmail.com")

        'set the content
        mail.Subject = "Plagarism Notification URGENT"
        mail.Body = Body + ControlChars.NewLine + "--------------------------------" + ControlChars.NewLine + OffensesCheck

        'send the message
        Dim smtp As New SmtpClient("smtp.gmail.com", 587)
        smtp.EnableSsl = True
        smtp.DeliveryMethod = SmtpDeliveryMethod.Network
        smtp.Credentials = New NetworkCredential("plagarism.notify.upb@gmail.com", "passwordhere")