The parameter 'addresses' cannot be an empty string

后端 未结 2 1546
说谎
说谎 2020-12-11 03:08

I am trying to send an email asp.net, using the System.Net.Mail.SmtpClient class.

However I am getting the following exception message:

The parameter         


        
2条回答
  •  执念已碎
    2020-12-11 03:43

    This exception is being thrown by the MailAddress constructor. It means you are trying to add an empty string as an email address, which is not valid.

    In this case it means toEmailAddress is an empty string.

提交回复
热议问题