3

I have searched all over the web for a solution for this situation. I created an application using a PowerTCP component to receive and change mails(Imap/pop3) I created a new object for them and now all I want is to create a server*(Mail Server)* that uses Imap or pop3 mails to receive and sends mails with SMTP. I know that I need to use specific ports for it. What I want to know is how can I create an imap/pop3 object from my C# object(my class , properties, ext) using c# to send to the client email application (like outlook). I searched a lot for this and found nothing. I don't want to use any "close" server application for this because that I want to change Do I need to create it from the beginning or there is any ready to use solution for this. do you have any suggestion code template ext...

TIA Michal

Michal
  • 31
  • 1
  • 1
  • 2

2 Answers2

0

Check out this site, it has examples of how to implement SMTP/POP

http://www.codeproject.com/KB/IP/Pop3MailClient.aspx

C#'s built in classes are pretty stable, use SMTP and POP3.

Good luck!

Nili
  • 1,963
  • 3
  • 20
  • 39
  • 1
    i need to create mail server NOt client – Michal Jul 14 '11 at 12:40
  • and by server you mean MX host? Then you need to create a program that listens to some port (the common port is 25 for SMTP) and parse the SMTP syntax (that is pretty much straight forward). Then you need to store the received message somewhere (create a filesystem structure to simulate inbox per user), and create another thread that listens to some port (the common port is 110 to POP) and parse the POP requests. That's all... – Nili Jul 14 '11 at 12:51
  • I know that , and I did it. But how can I send map or pop3 from this server . I need to create an c# interface for this – Michal Jul 14 '11 at 13:13
  • I assume you implemented the part that listens to port 25 and saves on disk an email. I don't understand what you mean by "send POP3 from this server". If you need to support users that wish to read their emails, meaning support POP3 commands, you need to listen to port 110 and when a client connects handle his input. If you wish to send some email upon email arrival, you need to connect to the desired MX (yes, you can use the same port 25 for outgoing communication) and send an email. Use C#'s built-in SMTP class for that. If you send emails to your own users just play with the filesystem... – Nili Jul 14 '11 at 14:26
  • i know all of that but i need to know how to create imap\pop3 object to the client . i create my own c# object for this but i need to convert it imap\pop object for client like outlook to read them – Michal Jul 14 '11 at 14:38
  • then please read the article in the original comment - http://www.codeproject.com/KB/IP/Pop3MailClient.aspx - it has lots of examples on how to create imap and pop clients. you can merge them into your server and then you have a server that also sends emails. – Nili Jul 14 '11 at 14:45
-1

I believe S22.Imap is the most popular general IMAP protocol API in Nuget.

Franky Kraisorn
  • 87
  • 1
  • 1
  • 4
  • Welcome to SO! Check the question (" `how can I create an imap/pop3 object from my C# object(my class , properties, ext) using c# to send to the client email application (like outlook)` ") and your answer... Is it an answer? – David García Bodego Nov 20 '19 at 03:48
  • The question is about creating IMAP server, not the client connecting to server – iroel May 18 '20 at 06:32