c# - Email sending from 1and1 SMTP server -


trying send email 1and1 smtp server in asp :

 mailmessage msg = new mailmessage();         msg.from = new mailaddress("admin@mywebsite.com");         msg.to.add("personalmail");         smtpclient smtp = new smtpclient("auth.smtp.1and1.fr",465);         smtp.credentials = new networkcredential("admin@mywebsite.com", "mypassword");         smtp.enablessl = true;         try         {             // smtp.send(msg);             smtp.send(msg);             return "ok";         }         catch (exception e)         {             return e.tostring();         } 

the code goes in catch error called :"net_io_connectionclosed" know problem ? regards

hyrozen,

you have use port 587.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -