Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi ,

i have a problem in sending e-mail

the description as below:-

Actually i am able to send email through gmail by providing username and password .

but i have to do this by not providing username and password .
I am working in National Informatics Centre and ther smtp server name is mail.nic.in

and i trying for this programme from last 2 days but m failed

please provide sum code sample help if u have
Posted
Comments
thatraja 29-Nov-10 3:40am    
better you show your code here with error details, you will get the solution quickly
Sebastien T. 29-Nov-10 3:42am    
What is exactly the problem with mail.nic.in ? Because if it is work with gmail, is work with your smtp (just change username, password, port) or it is perhaps because your smtp require certificat ?
sharmarun 29-Nov-10 23:12pm    
thanxz for ur comments

1 solution

It can be because of various reasons. You need to look at them one by one.
Is the port open? Firewall permissions in place?
Further make sure you have configured SMTP configuration in Web.Config:
<system.net>
   <mailSettings>
     <smtp from="abc@somedomain.com">
       <network host="somesmtpserver" port="25" userName="name" password="pass" defaultCredentials="true" />
     </smtp>
   </mailSettings>
</system.net>

If needed, have a look at this Microsoft Video tutorial:
Use ASP.NET to send Email from Website[^]
If needed, there are lots of article on this very site on how to send emails
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900