Click here to Skip to main content
15,880,608 members
Articles / Programming Languages / C#

Email Client Application by Implementing Our Own SMTP and POP3 protocols using C#

Rate me:
Please Sign up or sign in to vote.
3.31/5 (32 votes)
9 Dec 2008GPL32 min read 210K   11.8K   106   81
In this email client application, I have implemented my own SMTP and POP3 protocols in C#.
Image 1

How to send an email message? (click on compose mail tab)

You can send an email message by using any SMTP server, which allows you to do so. For example, you can send an email message by using gmail smtp server (it is freely available) to any SMTP server like GMail, Yahoo, Hotmail, etc.

          gmail smtp server:   smtp.gmail.com 
          gmail smtp port:  587 
          user name:   gmail user id (without @gmail.com) 
          password:   gmail password

After providing the above information, you specify sender and recepient's email address. You can specify more than one recepient's email address; each is separated by comma or semi-colon. The fields cc and bcc are optional. Then you specify subject, add file attachments(if any), and write the actual message. You may apply formatting on the actual message. Then you click on send button in order to send the email. The status bar shows you progress information.

How to receive email messages? (click on check mail tab)

You can receive emails from any pop server, which allows you to do so. For example, gmail pop server is freely available. In order to use GMail pop service, you must first enable pop service by going into GMail settings. In GMail settings, click on "forwarding and pop/imap" option, then select "enable pop for all mail" option and after that click on save changes button. Now you can check your emails by using my email client application.

          gmail pop server:   pop.gmail.com 
          gmail pop port:   995 
          user name:   gmail user id with @gmail.com 
          password:   gmail password

After providing the above information, click on connect button. After connecting and verifying user name and password, all emails (if there exist any) will be displayed in the inbox. In order to delete an email, press right click on the email, a context menu will display, then select delete option. In order to display an email message, press left click on the email. After fetching the email from the pop server, it will be displayed to the user. If the email contains any file attachment, then the user can also save the file by first selecting it and then click on save option.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer Techlogix
Pakistan Pakistan
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: A doubt about attachments... txt files not recognised.... Pin
jlarini15-Jan-09 2:55
jlarini15-Jan-09 2:55 
GeneralRe: A doubt about attachments... txt files not recognised.... Pin
NitinMakwana31-Mar-10 19:16
NitinMakwana31-Mar-10 19:16 
GeneralRe: A doubt about attachments... txt files not recognised.... Pin
NitinMakwana31-Mar-10 21:43
NitinMakwana31-Mar-10 21:43 
QuestionCross-thread error... Pin
jlarini8-Jan-09 7:50
jlarini8-Jan-09 7:50 
AnswerRe: Cross-thread error... Pin
Rizwan Ahmed8-Jan-09 11:31
Rizwan Ahmed8-Jan-09 11:31 
GeneralRe: Cross-thread error... Pin
jlarini9-Jan-09 1:08
jlarini9-Jan-09 1:08 
QuestionException of type 'Email_Client.Pop3ClientException' was thrown. Pin
Tapas Ranjan Singh8-Jan-09 2:12
Tapas Ranjan Singh8-Jan-09 2:12 
AnswerRe: Exception of type 'Email_Client.Pop3ClientException' was thrown. Pin
Rizwan Ahmed8-Jan-09 5:38
Rizwan Ahmed8-Jan-09 5:38 
Tell me about the detailed error message which you are getting during this exception.

Rizwan Ahmed

GeneralRe: Exception of type 'Email_Client.Pop3ClientException' was thrown. Pin
Tapas Ranjan Singh8-Jan-09 18:53
Tapas Ranjan Singh8-Jan-09 18:53 
GeneralRe: Exception of type 'Email_Client.Pop3ClientException' was thrown. Pin
Rizwan Ahmed8-Jan-09 21:15
Rizwan Ahmed8-Jan-09 21:15 
GeneralRe: Exception of type 'Email_Client.Pop3ClientException' was thrown. Pin
Nurulhuda19-Apr-09 22:23
Nurulhuda19-Apr-09 22:23 
QuestionRe: Exception of type 'Email_Client.Pop3ClientException' was thrown. Pin
NitinMakwana3-Mar-10 18:56
NitinMakwana3-Mar-10 18:56 
AnswerRe: Exception of type 'Email_Client.Pop3ClientException' was thrown. Pin
Member 129251475-Apr-17 6:16
Member 129251475-Apr-17 6:16 
GeneralNot Receive Emails sent by your application Pin
Member 15187116-Dec-08 1:52
Member 15187116-Dec-08 1:52 
GeneralRe: Not Receive Emails sent by your application Pin
Rizwan Ahmed16-Dec-08 4:55
Rizwan Ahmed16-Dec-08 4:55 
GeneralRe: Not Receive Emails sent by your application Pin
Member 15187116-Dec-08 14:43
Member 15187116-Dec-08 14:43 
GeneralNot correct with Unicode content Pin
Member 15187114-Dec-08 20:49
Member 15187114-Dec-08 20:49 
GeneralRe: Not correct with Unicode content Pin
Rizwan Ahmed14-Dec-08 23:05
Rizwan Ahmed14-Dec-08 23:05 
GeneralRe: Not correct with Unicode content Pin
Member 15187115-Dec-08 1:59
Member 15187115-Dec-08 1:59 
GeneralRe: Not correct with Unicode content Pin
Rizwan Ahmed15-Dec-08 21:20
Rizwan Ahmed15-Dec-08 21:20 
Generalnot working please help Pin
VogueDev10-Nov-08 21:10
VogueDev10-Nov-08 21:10 
GeneralRe: not working please help Pin
Rizwan Ahmed11-Nov-08 1:18
Rizwan Ahmed11-Nov-08 1:18 
GeneralNot working for hotmail email in gmail and Images not be displayed Pin
pradeepswasule21-Oct-08 3:13
pradeepswasule21-Oct-08 3:13 
Generalthanks Pin
Shobeir Abbaszadeh9-Oct-08 12:46
professionalShobeir Abbaszadeh9-Oct-08 12:46 
GeneralSame work in C++ Pin
Nikita Agarwal28-Jul-08 21:48
Nikita Agarwal28-Jul-08 21:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.