2 Replies - 281 Views - Last Post: 15 February 2013 - 04:31 PM Rate Topic: -----

#1 the5thelement  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 59
  • Joined: 30-July 12

SMTP Problem

Posted 15 February 2013 - 04:09 PM

I am having a problem sending an email through my application.

This is what I have.
Imports System.Net.Mail
Public Class Form2
    Dim EmailAddress As String
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
        If My.Settings.Register = False Then
            Select Case MsgBox("Before you can save changes to Launcher Maker Elite you" & vbCrLf & "must register the program." & vbCrLf & vbCrLf & "Do you want to register Launcher Maker Elite?", MsgBoxStyle.YesNo, )
                Case MsgBoxResult.Yes

                    EmailAddress = InputBox("Please enter the email address that the registration" & vbCrLf & "key will be sent to.")

                    Dim SmtpServer As New SmtpClient()

                    Dim mail As New MailMessage()

                    SmtpServer.Credentials = New System.Net.NetworkCredential("noreply.launchemrmakerelite@gmail.com", "***************")
                    SmtpServer.Host = "smtp.gmail.com"
                    SmtpServer.Port = 587
                    SmtpServer.EnableSsl = True

                    mail.From = New MailAddress("noreply.launchermakerelite@gmail.com")
                    mail.To.Add(EmailAddress)
                    mail.Subject = "Launcher Maker Elite Registration"
                    mail.Body = "This is for testing SMTP mail."

                    SmtpServer.Send(mail)

                Case (MsgBoxResult.No)

            End Select

        ElseIf My.Settings.Register = True Then

        End If
    End Sub
End Class


This is the exception.
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.


Is This A Good Question/Topic? 0
  • +

Replies To: SMTP Problem

#2 _HAWK_  Icon User is offline

  • Master(Of Foo)
  • member icon

Reputation: 1043
  • View blog
  • Posts: 4,053
  • Joined: 02-July 08

Re: SMTP Problem

Posted 15 February 2013 - 04:15 PM

Check the emails there may be a typo.
Was This Post Helpful? 1
  • +
  • -

#3 the5thelement  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 59
  • Joined: 30-July 12

Re: SMTP Problem

Posted 15 February 2013 - 04:31 PM

Thanks. Spelled the email address wrong in the NetworkCredential section.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1