SMTP Email VB.net 2008

B

Brian

Hello all, we don't actually host our own server but still should work
the same.

Here is the error message i get
"error mailbox unavailable. The server response was: must be
authenticated code 550"

and below is the code. the only thing i had to to do was change the
port as our isp blocks 25. Just wondering if anyone has run into this
beefore. TIA

' this calls the sendsimple mail
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
SendSimpleMail("(e-mail address removed)", "(e-mail address removed)",
"Yikes", "This is a test")
End Sub


Public Sub SendSimpleMail(ByVal FromAddr As String, ByVal ToAddr As
string, _
ByVal Subject As String, ByVal Body As String)
'

Dim Client As SmtpClient

Dim Message As MailMessage

' SMTP server goes here
Client = New SmtpClient("SMTP.domain.com")
Client.Credentials = New
System.Net.NetworkCredential("username??", "Password")
'Portproperties
Client.Port = 587

' Simple plain text message
Message = New MailMessage(FromAddr, ToAddr, Subject, Body)

' Send message
Try
Client.Send(Message)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, "SMTP Error")
End Try

Message = Nothing
Client = Nothing

End Sub
 
K

kimiraikkonen

Hello all, we don't actually host our own server but still should work
the same.

Here is the error message i get
"error mailbox unavailable. The server response was: must be
authenticated code 550"

and below is the code. the only thing i had to to do was change the
port as our isp blocks 25. Just wondering if anyone has run into this
beefore. TIA

' this calls the sendsimple mail
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
SendSimpleMail("(e-mail address removed)", "(e-mail address removed)",
"Yikes", "This is a test")
End Sub

Public Sub SendSimpleMail(ByVal FromAddr As String, ByVal ToAddr As
string, _
ByVal Subject As String, ByVal Body As String)
'

Dim Client As SmtpClient

Dim Message As MailMessage

' SMTP server goes here
Client = New SmtpClient("SMTP.domain.com")
Client.Credentials = New
System.Net.NetworkCredential("username??", "Password")
'Portproperties
Client.Port = 587

' Simple plain text message
Message = New MailMessage(FromAddr, ToAddr, Subject, Body)

' Send message
Try
Client.Send(Message)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, "SMTP Error")
End Try

Message = Nothing
Client = Nothing

End Sub

If you selected the right port using proper credentials, but still no
luck at sending mail, you should also check if your SMTP server
requires SSL to be enabled, so add this:

' EnableSsl is a member of SMTPClient
client.EnableSsl = True

..hope it helps,

Onur Güzel
 
B

Brian

well ours does not require ssl but I tried it anyways and same error
code not sure what it is I am doing wrong
 
K

kimiraikkonen

well ours does not require ssl but I tried it anyways and same error
code not sure what it is I am doing wrong

Not sure, first you should check your mailbox's health by accessing
using any mail program like Outlook Express if it's really running,

Secondly, make sure you're entering correct username and password,

Sorry if it doesn't help,

Onur
 
B

Brian

I actually have been running this mail account through thunderbird for
about a year now without any problems that is why i am at a loss.

our host is 1and1.com but we have our own domain xyz.com
and when I login it's (e-mail address removed) but of course the Imap and smtp
our both 1and1.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top