sending email with delphi 7

Here you can talk about C++ And C# And Other languages programming.

sending email with delphi 7

Postby DarkCoder » Tue May 23, 2006 11:55 pm


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 :-)
DarkCoder
imFiles Senior
imFiles Senior
 
Posts: 175
Joined: Mon Oct 31, 2005 7:55 pm

Re: sending email with delphi 7

Postby nice_fox102 » Wed Mar 14, 2007 6:43 am

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;
nice_fox102
imFiles Junior
imFiles Junior
 
Posts: 71
Joined: Wed Nov 01, 2006 11:16 am

Postby DarkCoder » Thu Mar 15, 2007 8:43 pm

Posted: Wed May 24, 2006 4:55 amy


yah thanks but i figured it out already.. this post was a long time ago lol :lol:
Last edited by DarkCoder on Thu Mar 15, 2007 8:43 pm, edited 1 time in total.
DarkCoder
imFiles Senior
imFiles Senior
 
Posts: 175
Joined: Mon Oct 31, 2005 7:55 pm


Return to C++, C# And Others Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests