E-Mail server

I want to develop E-Mail server using Dephi, how can I use Delphi's features of Client/server development, and is that easy in Delphi ?

Motaz
LVL 7
MotazAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

intheCommented:
what version of delphi you have?
do you have internet components?
if not get these:
http://www.pbe.com/Winshoes/
and f.piette's
http://www.rtfm.be/fpiette/indexuk.htm

with these it is fairly trivial to make.
if you have teh internet componeents then they have demos in the delphi\demos\internet directory.
Regards Barry
0
MotazAuthor Commented:
Delphi 4 Client/Server
0
MotazAuthor Commented:
did you mean smtp and pop componets ?, I do not want to use Windows post office, I want to write my own server and run it in Microsoft information server. Also I want to use internet explorer to open this mail, I mean the client must be Internte Explorer or Netscape Navigator

Thanks
Motaz
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

intheCommented:
have you looked at the demos.
im going to sleep now but later if this question still around i look back and see if i have examples of anything(i saved one once that someone posted a  but cant find it now)
what features do you want in your program?just fetch email from isp..
0
intheCommented:
oh i just see your next comment ,that seems more difficult certainly,and i dont have examples of this though the basic internals is probably the same i mean i suppose you still need to fetch email from isp ..(am i right ?)
0
MotazAuthor Commented:
did you mean that I muse use already exits mail servers ?
0
intheCommented:
er no..
0
MotazAuthor Commented:
did you mean that I muse use already exits mail servers ?
0
MotazAuthor Commented:
barry if you have yahoo messanger we can chat in it, my login name is motaz1
0
MotazAuthor Commented:
barry if you have yahoo messanger we can chat in it, my login name is motaz1
0
MotazAuthor Commented:
Adjusted points to 100
0
TheNeilCommented:
If you've got access to the Fastnet group of components then it's a totalt doddle (I can't remember which versions of Delphi that these ship with). To send mail use the NMSMTP component, and to receive mail use the NMPOP3 component.

To send mail add the following code:

BEGIN
  IF NOT(SMTP.Connected)
  THEN
  BEGIN
    SMTP.Host:= '192.130.0.1';
    SMTP.UserID := 'TheNeil';
    SMTP.Connect;
  END;

  IF SMTP.Connected
  THEN
  BEGIN
    SMTP.ClearParams := TRUE;
    SMTP.SubType := mtPlain;
    SMTP.EncodeType := uuMime;

    SMTP.PostMessage.FromAddress := 'TheNeil@geeza.com';
    SMTP.PostMessage.FromName := 'The Neil';
    SMTP.PostMessage.ToAddress.Text := 'bloke@geeza.com';
    SMTP.PostMessage.Body.Text := 'Message';

    SMTP.PostMessage.Subject := 'Subject';
    SMTP.PostMessage.Date := DateToStr(Date);

    SMTP.SendMail;
    MessageDlg('Mail sent', mtInformation, [mbOk], 0);
  END
  ELSE
    MessageDlg('NOT connected', mtInformation, [mbOk], 0);
END;

This example will send a simple message to the ToAddress address

To receive mail, use the following code:

BEGIN
  IF NOT(POP3.Connected)
  THEN
  BEGIN
    POP3.DeleteOnRead := FALSE;
    POP3.Host := '192.130.0.1;
    POP3.UserID := 'TheNeil';
    POP3.Password := 'Password'; {The Password MUST be supplied else we fail the authentication check straight away}

    Receive_MailClick(Self);
    POP3.Connect;
  END;
  IF POP3.Connected
  THEN
  BEGIN
    IF NOT(Timer1.Enabled)
    THEN
      MessageDlg(IntToStr(POP3.MailCount) + ' message(s)', mtInformation, [mbOk], 0);

    ListBox1.Items.Clear;
    FOR n := 1 TO POP3.MailCount
    DO
    BEGIN
      POP3.GetMailMessage(n);
      Mail := POP3.MailMessage;
      ListBox1.Items.Add(Mail.From + ' ' + Mail.Subject);
    END;
  END
  ELSE
    MessageDlg('NOT connected', mtInformation, [mbOk], 0);
END;

The above example will examine the mailbox specified, report how many messages there are and then list all of them in a listbox (well, it'll display the sender and subject)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MotazAuthor Commented:
TheNiel what about mail server ? did you mean that I must use windows post office ?

I use now Delphi 5 Enterprise

Motaz
0
TheNeilCommented:
Delphi 5 Enterprise definitely has the components that you need.
What do you mean by mail server? As long as you have an e-mail account setup on your machine, the POP3 and SMTP components can use it to send and receive mail for you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.