Skip to content

sending email with delphi 7

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #191482
    DarkCoder
    Member

    ok.. i’m working on a program but i’m having trouble sending email with delphi 7, i tried many different ways, but it seems like none of them work, if you have any ideas let me know 🙂

    #191484
    nice_fox102
    Member

    Use Indy components installed with Delphi. It contains SMTP component that made this job as easiest way.

    procedure SendSimpleMail;
    var
    Msg: TIdMessage;
    DestAddr: TIdEmailAddressItem;
    begin
    Msg := TIdMessage.Create(Self);
    Msg.From.Text := ‘restive98’;
    Msg.From.Address := ‘info@programminghorizon.com‘;
    Msg.Subject := ‘Test’;

    DestAddr := Msg.Recipients.Add;
    DestAddr.Text := ‘restive98’;
    DestAddr.Address := ‘nice_fox102@yahoo.com‘;
    Msg.Body.Add(‘This is simple test mail.’);

    IdSMTP1.Host := ‘mail.programminghorizon.com’;
    IdSMTP1.Port := 25;
    IdSMTP1.AuthenticationType := atLogin;
    IdSMTP1.Username := ‘info@ProgrammingHorizon.com‘;
    IdSMTP1.Password := ‘*********’;
    IdSMTP1.Connect;
    IdSMTP1.Authenticate;
    IdSMTP1.Send(Msg);
    IdSMTP1.Disconnect;
    end;

    #191483
    DarkCoder
    Member

    Posted: Wed May 24, 2006 4:55 amy

    yah thanks but i figured it out already.. this post was a long time ago lol 😆

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.