Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
For 10 years I've used same code - very similar to that which follows. All of a sudden I'm getting an error: "Mailbox Unavailable 5.5.1 Authentication required".

Using VB.net, my code:

Imports System
Imports System.IO
Imports System.Net.Mail

Public Class Form1

Private Sub btnSend_Click(sender As Object, e As EventArgs) Handles btnSend.Click

Dim strMyMailAddress As String
Dim strMyPassword As String
Dim strRecipient As String

Dim SmtpServer As New SmtpClient()

SmtpServer.Credentials = New Net.NetworkCredential(strMyMailAddress, strMyPassword)
SmtpServer.Host = "smtpauth.earthlink.net"
SmtpServer.EnableSsl = False

SmtpServer.Port = 587

Dim mail As New MailMessage()
mail = New MailMessage()
Try

mail.From = New MailAddress(strMyMailAddress, "Pick A Name", System.Text.Encoding.UTF8)
mail.To.Add(strRecipient)
mail.Subject = "Test Send"
mail.Body = "Test Send E-Mail Body Text"
mail.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure
SmtpServer.Send(mail)
MsgBox("Done")
Catch ex As Exception
MsgBox(ex.ToString())
End Try
Me.Close()
End Sub
End Class

What I have tried:

With very minor modification, this works on Outlook and Gmail servers (just Earthlink has gone hay-wire). I've tried changing passwords, order of server properties access via alternative e-mail accounts and more. Any ideas?
Posted
Comments
Richard MacCutchan 2-Apr-22 4:38am    
You need to contact the owners of Earthlink for assistance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900