0 votes
by (120 points)

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 "




Please let me know if anything i miising

Applies to: Rebex Secure Mail

1 Answer

0 votes
by (18.0k points)

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.