473,549 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SMTP Email VB.net 2008

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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
SendSimpleMail( "Us******@domai n.com", "Us******@domai n.com",
"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("SMT P.domain.com")
Client.Credenti als = New
System.Net.Netw orkCredential(" username??", "Password")
'Portproperties
Client.Port = 587

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

' Send message
Try
Client.Send(Mes sage)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exc lamation Or MsgBoxStyle.OkO nly, "SMTP Error")
End Try

Message = Nothing
Client = Nothing

End Sub
Aug 22 '08 #1
4 3367
On Aug 22, 5:47 pm, Brian <nixtoo...@hotm ail.comwrote:
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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
SendSimpleMail( "Usern...@domai n.com", "Usern...@domai n.com",
"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("SMT P.domain.com")
Client.Credenti als = New
System.Net.Netw orkCredential(" username??", "Password")
'Portproperties
Client.Port = 587

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

' Send message
Try
Client.Send(Mes sage)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exc lamation Or MsgBoxStyle.OkO nly, "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.EnableSs l = True

..hope it helps,

Onur Güzel
Aug 22 '08 #2
well ours does not require ssl but I tried it anyways and same error
code not sure what it is I am doing wrong

kimiraikkonen wrote:
On Aug 22, 5:47 pm, Brian <nixtoo...@hotm ail.comwrote:
>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
authenticate d 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(B yVal sender As System.Object, ByVal e As
System.EventAr gs) Handles Button1.Click
SendSimpleMail( "Usern...@domai n.com", "Usern...@domai n.com",
"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("SMT P.domain.com")
Client.Credenti als = New
System.Net.Net workCredential( "username?? ", "Password")
'Portproperties
Client.Port = 587

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

' Send message
Try
Client.Send(Mes sage)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exc lamation Or MsgBoxStyle.OkO nly, "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.EnableSs l = True

..hope it helps,

Onur Güzel
Aug 22 '08 #3
On Aug 22, 9:02 pm, Brian <nixtoo...@hotm ail.comwrote:
well ours does not require ssl but I tried it anyways and same error
code not sure what it is I am doing wrong

kimiraikkonen wrote:
On Aug 22, 5:47 pm, Brian <nixtoo...@hotm ail.comwrote:
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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
SendSimpleMail( "Usern...@domai n.com", "Usern...@domai n.com",
"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("SMT P.domain.com")
Client.Credenti als = New
System.Net.Netw orkCredential(" username??", "Password")
'Portproperties
Client.Port = 587
' Simple plain text message
Message = New MailMessage(Fro mAddr, ToAddr, Subject, Body)
' Send message
Try
Client.Send(Mes sage)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exc lamation Or MsgBoxStyle.OkO nly, "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.EnableSs l = True
..hope it helps,
Onur Güzel
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
Aug 22 '08 #4
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 us******@xyz.co m but of course the Imap and smtp
our both 1and1.com

kimiraikkonen wrote:
On Aug 22, 9:02 pm, Brian <nixtoo...@hotm ail.comwrote:
>well ours does not require ssl but I tried it anyways and same error
code not sure what it is I am doing wrong

kimiraikkone n wrote:
>>On Aug 22, 5:47 pm, Brian <nixtoo...@hotm ail.comwrote:
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
authenticate d 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(B yVal sender As System.Object, ByVal e As
System.Event Args) Handles Button1.Click
SendSimpleMail( "Usern...@domai n.com", "Usern...@domai n.com",
"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("SMT P.domain.com")
Client.Credenti als = New
System.Net.N etworkCredentia l("username?? ", "Password")
'Portproperties
Client.Port = 587
' Simple plain text message
Message = New MailMessage(Fro mAddr, ToAddr, Subject, Body)
' Send message
Try
Client.Send(Mes sage)
Catch ex As SmtpException
MsgBox("Error: " & ex.Message & " Code: " & ex.StatusCode, _
MsgBoxStyle.Exc lamation Or MsgBoxStyle.OkO nly, "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.Enable Ssl = True
..hope it helps,
Onur Güzel

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
Aug 28 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5550
by: dale zhang | last post by:
Hi, I write an asp.net web application. It has a “Contact Us†page, where users fill in their email, subject and text and hit send. Then the email will go to my hard coded yahoo email account. I was using optimum online service with smtp server as “mail.optonline.netâ€. I can receive email correctly. Now I switch to verizon DSL....
34
18167
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow "127.0.0.1". 4. Authentication: "Anonymous access" only. 5. Outbound connection listen to TCP 25. Besides,
3
4139
by: IanReardon | last post by:
Is it possible to configure an external SMTP server to route all of your outgoing mail through on Linux? I know in php.ini there is a parameter, but it says its only for windows? Can I do this on Linux?
7
2762
by: John Drako | last post by:
Currently, I run postfix on my own server to send message from my site (password requests, account activation notices and other messages). I have phpMailer on the server and all the messages (currently about 1000 messages are sent daily) are sent by SMTP through postfix. I'm contemplating moving this particular site's email to Gmail. Is...
5
2992
by: GuangXiN | last post by:
I need an stmp client to send email through my mail server. I don't want to use php's mail function. who can recommend some?
9
3270
by: mmm | last post by:
After reading about and using the smtplib module, I thought code such as below would ignore the 'Cc: ' body line below when sending messages and instead simply use the RECEIVERS list session = smtplib.SMTP(SMTPserver,port) session.set_debuglevel(1) session.ehlo(SMTPuser) # say hello session.starttls() # TLS needed session.ehlo(SMTPuser)...
7
5586
by: ayush patel | last post by:
Hi everyone, I am writing ASP code to send email using SMTP.I am getting error '8004020f' at .Send. this seems to be a common error. my SMTP server relays to anonymous email addresses.there is no firewall or proxy set up that can stop these mails to be sent. Infact i have seen the SMTP LOG FILE and (i dont know exactly what it says)i...
0
1716
by: =?Utf-8?B?TU9QU0M=?= | last post by:
Hi, i'm having a problem and hoping someone can give me some insight. I have Server Enterprise 2008 installed, set to a file server role with FSRM installed. I'm trying to setup where it will notify me when a user is over the limit but it seems to be having a problem. Even to the point of a test msg being sent. I have it pointed to our...
2
6850
by: Eric E | last post by:
Hello All - I am using python to send an email with a large zip file as an attachment. I successfully sent a 52M attachment. If I try to send a 63M attachment or larger, the message never gets through. I do not get any errors in my python code. I pasted my python code below. from email.MIMEBase import MIMEBase from...
0
7548
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
6074
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5391
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5114
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3518
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3499
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1083
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.