Sending an email using SMTP throws a "Mailbox unavailable. The server response was: Too many invalid recipients" Error

Hi there,
i'm trying to send an email with the code below. The thing is that i keep getting this error "Mailbox unavailable. The server response was: Too many invalid recipients" is there something i'm missing?
I'm using VS 2008
Public Shared Sub SendNotificationEmail(ByVal emailer As String, ByVal MessageSubject As String, ByVal MessageBody As String)

            'create the mail message
            Dim mail As New Net.Mail.MailMessage()

            'set the addresses
            mail.From = New Net.Mail.MailAddress("")'this email address does exist
            mail.To.Add("") 'this email does exits
            'set the content
            mail.Subject = MessageSubject & " " & Now.ToShortDateString
            mail.Body = MessageBody

                'set the server to be used
                Dim smtp As New Net.Mail.SmtpClient("") 
                'send the message
            Catch ex As Exception
                Throw ex.InnerException
            End Try

        End Sub

Open in new window

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

pschramaConnect With a Mentor Commented:
Sounds like the mailserver you are using only accepts mail for its domain and it's not a mail relay used for outbound mail. Are you sure there isn't a separate mailserver for outgoing mail?
After the
 Dim smtp As New Net.Mail.SmtpClient("")
Try adding in
smtp.Credentials = New System.Net.NetworkCredential("username", "password")  
COHFLAuthor Commented:
those credential should be the sender credential right?
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

COHFLAuthor Commented:
if the credential are the sender, still not luck. I get the same error
Kumaraswamy RCommented:
All Courses

From novice to tech pro — start learning today.