Click here to Skip to main content
15,899,126 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear codeproject members
I want your kind attention towards following problems:

1. I have a problem in C# winform application. I want to send email from my application but i have to choose the host and port number at runtime e.g. smtp.mail.yahoo.com and port no 465 or smtp.google.com etc. 587. what must be the best alternative to acoomplish this?

2. When I am testing this application then antivirus (quick heal) installed on my pc is blocking my application and saying that is not trusted email client. how can I include my application in antivirus / windows trusted email client list programmatic?

3. Is it required that we should use default port 25 or any other port like 465 or 587?

Thanks in advance
Posted
Updated 23-Mar-12 1:56am
v3
Comments
[no name] 23-Mar-12 7:57am    
Spellings and Grammatical errors corrected.

1 solution

Find following links useful for sending email using C#. You need to not to configure port, the email server automatically takes port internally.

http://social.msdn.microsoft.com/forums/en/netfxnetcom/thread/a75533eb-131b-4ff3-a3b2-b6df87c25cc8/

http://www.c-sharpcorner.com/uploadfile/scottlysle/send-email-messages-and-attachments-using-C-Sharp/

Find following link useful for unblocking email client by antivirus through code using c#.

http://stackoverflow.com/questions/3194978/prevent-anti-virus-to-block-outgoing-email-with-c-sharp


Hope this help!
 
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