Click here to Skip to main content
15,914,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends,

I have a query in sending email through application.

I am able to send mails through Gmail smtp server, but I have a requirement that it should accept any smtp server and should be able to send mails using that server.
ex:gmail,Yahoo or hotmail etc....

Please let me know if there is are any ways to achieve this.
Posted
Updated 18-Apr-11 21:26pm
v2
Comments
Dalek Dave 19-Apr-11 3:26am    
Edited for Grammar, Syntax and Readability.

There is a generic routine which should allow that here: Sending an Email in C# with or without attachments: generic routine.[^]
 
Share this answer
 
If you have done this through one SMPT server, you can do it through any other.

The only think to take care of is the server configuration settings.
Create a data class with all possible server configuration and persist it in a file. Create a UI to edit this configuration. For persistence, I would recommend Data Contract, start from here: http://msdn.microsoft.com/en-us/library/ms733127.aspx[^].

—SA
 
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