Tasnim
چهارشنبه 21 فروردین 1387, 08:50 صبح
سلام دوستان
منباکامپونت indy10 میخام ایمیل بفرستم
روش کارم هم بصورت زیره، اما ایمیل فرستاده نمیشه هرچی هم تویسایت سرچ کردم ندونستم جواب درستی پیدا کنم لطفا منو راهنمایی کنید
اینم کدی که نوشتم
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
try
SMTP.Host := 'server.irwebhost.com';
SMTP.Port := 465;
SMTP.Username :='info@edch.ir';
SMTP.Password := '******';
// SMTP.AuthType := atLogin;
MyMessage.From.Address := 'info@edch.ir';
//Connect to the server.
SMTP.Connect;
with MyMessage do
try
Body.Text:=Memo1.Text;
Recipients.EMailAddresses:='Tasnim.4038@gmail.com' ;
Subject:='Test';
SMTP.Send(MyMessage);
finally
SMTP.Disconnect;
end;
except
//If any error occures, show the error message in the status bar.
on E: Exception do
StatusBar1.SimpleText := E.Message;
end
end;
منباکامپونت indy10 میخام ایمیل بفرستم
روش کارم هم بصورت زیره، اما ایمیل فرستاده نمیشه هرچی هم تویسایت سرچ کردم ندونستم جواب درستی پیدا کنم لطفا منو راهنمایی کنید
اینم کدی که نوشتم
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
try
SMTP.Host := 'server.irwebhost.com';
SMTP.Port := 465;
SMTP.Username :='info@edch.ir';
SMTP.Password := '******';
// SMTP.AuthType := atLogin;
MyMessage.From.Address := 'info@edch.ir';
//Connect to the server.
SMTP.Connect;
with MyMessage do
try
Body.Text:=Memo1.Text;
Recipients.EMailAddresses:='Tasnim.4038@gmail.com' ;
Subject:='Test';
SMTP.Send(MyMessage);
finally
SMTP.Disconnect;
end;
except
//If any error occures, show the error message in the status bar.
on E: Exception do
StatusBar1.SimpleText := E.Message;
end
end;