The specified character string is not in the format required for an email address

Asked

Viewed 446 times

0

I’m doing a routine and I’m not succeeding I’m having this mistake and on the web.config I left so

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

And in the App 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 ?

  • What email destination are you using? It may be the problem.

  • What is the content of message.Destination?

  • I’m using my own gmail as destiny

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.