.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Proxy Refusing While Sending A Mail From ASP.NET by using System Net.Mail NameSpace

Posted By: BangaruBabuPureti     Posted Date: July 09, 2010    Points:2   Category :ASP.Net
I wrote some Code For Sending e-Mail in ASP.NET....it is working Fine Without Using Proxy Server....

But In Production, I am Working Under Proxy Server @ that time i am Facing Run time Error Like

"Failure Sending Mail"---- even i stopped Anti virus and Firewalls.....


Anybody suggest remedy For My Problem,

Thanks In Advance

Responses
Author: Sunil Yadav       [Moderator]      
Posted Date: July 10, 2010     Points: 5   

Hi,

You need to specify proxy setting before sending.
This you can do it via code or by setting web.config file as shown below.

<system.net>
<defaultProxy>
<proxy proxyaddress="proxy server"/>
</defaultProxy>
<mailSettings>
<smtp>
<network host="hostname" port="port" userName="username" password="password"/>
</smtp>
</mailSettings>
</system.net>




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend