c# - problem sending mail from my website using gmail-mailservers -


i want use gmail-mail servers, have registrated google app , have company mails in gmail.

iam getting error: system.net.webexception: remote name not resolved: 'smtp.gmail.com'

why not working, iam using email , password

                 mailmessage message = new mailmessage(from, to, subject, body);             message.isbodyhtml = true;             message.priority = mailpriority.high;             smtpclient mailclient = new smtpclient();             mailclient.credentials = new system.net.networkcredential                     ("___@gmail.com", "__________");             mailclient.port = 587;             mailclient.host = "smtp.gmail.com";             mailclient.enablessl = true;             mailclient.send(message);             message.dispose(); 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -