Results 1 to 2 of 2

Thread: Mail recipient failure

  1. #1
    Manny123 is offline VB.NET Forum Newbie
    .NET Framework
    .NET 2.0
    Join Date
    Mar 2012
    Posts
    16
    Reputation
    17

    Exclamation Mail recipient failure

    [XCODE]
    Private Sub BtnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSend.Click
    Dim smtpServer As New SmtpClient
    Dim mail As New MailMessage()
    smtpServer.Credentials = New Net.NetworkCredential("gnekissalon@yahoo.co.uk", "*****")
    smtpServer.Port = 995
    smtpServer.Host = "smtp.mail.yahoo.co.uk"
    smtpServer.EnableSsl = True
    mail = New MailMessage()
    mail.From = New MailAddress("gnekissalon@yahoo.co.uk")
    mail.To.Add(txtTo.Text)
    mail.Subject = txtsubject.Text
    mail.Body = LstOrders.Text
    smtpServer.Send(mail)[/XCODE]

    When i click the button the button to send it gives me an error message of "Failure sending mail".
    this is the email i'm sending data to RebelP_supplies@yahoo.co.uk

    Any ideas why it is failing?

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    14,203
    Reputation
    2369
    "Failure sending mail"
    You can catch SmtpException for the Send call, and check StatusCode for more information.

    Most results seems to suggest 995 is a POP port, while 465 is the SMTP port.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Harvest time tracking