I used Rebex component to send a mail, i getting error

One or more recipients rejected. Call SmtpException.GetRejectedRecipients() to get a collection of rejected email addresses

This is code

        Dim recipient As Certificate = Certificate.LoadPfx("F:\Project\Certificate\PC201104199220.pfx", "password")

        ' create an instance of MailMessage 
        Dim message As New MailMessage()
        Dim client As New Smtp

        ' set its properties to desired values 
        message.From = "test@gmail.com"
        message.[To] = "test1@gmail.com "
        message.Subject = "This is a simple message"
        message.BodyText = "Hello"
        message.BodyHtml = "Hello "

        client.Connect("chandru")

        message.Sign(recipient)

        client.Send(message)

Please let me know if anything i miising

asked 20 Apr '11, 05:38

kani's gravatar image

kani
151
accept rate: 0%

edited 20 Apr '11, 13:32

Jan%20Sotola's gravatar image

Jan Sotola ♦♦
3566


Could you please check whether the error is (or is not) related with signing your message? Just try to ommit calling the message.Sign(recipient) and execute the code again.

The described error message usually occurs when you are connecting to SMTP server that requires authentication and you don't provide correct login and password. Please check whether your SMTP server requires authentication.

link

answered 20 Apr '11, 13:41

Jan%20Sotola's gravatar image

Jan Sotola ♦♦
3566
accept rate: 36%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×53
×19

Asked: 20 Apr '11, 05:38

Seen: 872 times

Last updated: 20 Apr '11, 13:41