The specified string is not in the format required for an e-mail address

0

I'm doing a routine and I'm not succeeding I'm having this error and in web.config I left it like this

  <system.net >
<mailSettings>
  <smtp from="[email protected]">
    <network host="smtp.gmail.com" password="******" port="587" userName="testesolers"  enableSsl="true"/>
  </smtp>
</mailSettings>

And in the Application the call was made this way:

Dim client = New SmtpClient()
Return client.SendMailAsync("Mensagem Automática", message.Destination.ToString(), message.Subject.ToString(), message.Body.ToString())

Where am I going wrong?

    
asked by anonymous 25.05.2017 / 20:52

0 answers