Click here to Skip to main content
15,889,116 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 210.7K   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

 
QuestionThe Application does nor work anymore Pin
Member 1454908625-Feb-21 20:46
Member 1454908625-Feb-21 20:46 
QuestionSeverity Code Description Project File Line Suppression State Error Couldn't process file EmailClient.resx due to its being in the Internet or Restricted zone or having the mark of the web on the file. Remove the mark of the web if you want to proce Pin
Member 1393559326-Jun-20 6:33
Member 1393559326-Jun-20 6:33 
QuestionReceive Emails using ASP Webforms vb.net Pin
Member 107332782-Oct-17 7:59
Member 107332782-Oct-17 7:59 
QuestionThe Read method cannot be called when another read operation is pending. Pin
Member 1324268029-Jun-17 0:52
Member 1324268029-Jun-17 0:52 
QuestionException thrown at Pop3Client line 344: this.secureStream.AuthenticateAsClient(this.pop3ServerAddress); Pin
maxwilson29-Mar-17 2:54
maxwilson29-Mar-17 2:54 
QuestionReceives but does not send Pin
starapple14-May-16 16:51
starapple14-May-16 16:51 
Questionsending not work for yahoo Pin
Mihir_228618-Jun-15 2:03
Mihir_228618-Jun-15 2:03 
QuestionGive Error after send mail successfully Pin
Mihir_228617-Jun-15 2:05
Mihir_228617-Jun-15 2:05 
AnswerRe: Give Error after send mail successfully Pin
beingpratik15-Nov-15 4:33
beingpratik15-Nov-15 4:33 
AnswerRe: Give Error after send mail successfully Pin
Member 1324268018-Jun-17 22:05
Member 1324268018-Jun-17 22:05 
QuestionSTARTTLS Give erorr 454 on sending mail. Pin
Mihir_228617-Jun-15 1:35
Mihir_228617-Jun-15 1:35 
QuestionHow to move Fetched mails to a selected folder. Pin
Santhosh Kumar26-Sep-13 22:53
Santhosh Kumar26-Sep-13 22:53 
Questionauto complete text box Pin
jyothi asipu19-Feb-12 2:31
jyothi asipu19-Feb-12 2:31 
Question1 Pin
jyothi asipu29-Jan-12 2:43
jyothi asipu29-Jan-12 2:43 
AnswerRe: code in detail Pin
Rizwan Ahmed29-Jan-12 4:32
Rizwan Ahmed29-Jan-12 4:32 
Generalhow sync without using imap and pop3 port? is it possible through http or https protocol Pin
subash110711-May-11 20:04
subash110711-May-11 20:04 
GeneralI get an error Pin
Cool Smith9-Mar-11 3:22
Cool Smith9-Mar-11 3:22 
QuestionMessage body problem for HTML message body Pin
arindamrudra2-Mar-11 20:33
professionalarindamrudra2-Mar-11 20:33 
Generalthanks. Pin
MuhammadAdeel23-Oct-10 9:54
MuhammadAdeel23-Oct-10 9:54 
QuestionHow to retrieve message base on folder type??? Pin
Johnny Doeboi27-Sep-10 4:15
Johnny Doeboi27-Sep-10 4:15 
How can I pull the messages from the specific folders?
Like just pulling the data from the inbox, sent and etc. Instead of pulling all back at once?

Please help!
Thanks Smile | :)
QuestionWant to Use IMAP protocol [modified] Pin
jymitra20-Jul-10 1:55
jymitra20-Jul-10 1:55 
QuestionRe: Want to Use IMAP protocol Pin
Johnny Doeboi27-Sep-10 4:19
Johnny Doeboi27-Sep-10 4:19 
Generale-mails in arabic Pin
rula23-May-10 2:30
rula23-May-10 2:30 
GeneralRe: e-mails in arabic Pin
rula24-May-10 1:58
rula24-May-10 1:58 
GeneralRe: e-mails in arabic Pin
jsezar10-Aug-10 4:40
jsezar10-Aug-10 4:40 

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.