mail ile ilgili baska bi sorun daha
notname24.07.2005 - 16:47:30
selamun akeykum

sorunum aynen goruldugu gibi



unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IdMessage, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdMessageClient, IdSMTP, StdCtrls;

type
TForm1 = class(TForm)
MailMessage: TIdMessage;
SMTP: TIdSMTP;
Button1: TButton;
procedure ConnectMail;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
SentMail: Boolean;
public
{ Public declarations }
end;

const

SmtpUser : string = 'smtp_user=' + 'neropower@hotmail.com ';
SmtpHost: string = 'smtp_host=' + 'mx3.hotmail.com ';

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ConnectMail;
begin
//Yukarida bulunan SmtpHost da yazılı olan hostun adını nasıl aldırabilirim
//mesela Trim(Copy ile smtp host adını aşağıdaki yere yazdıırıp mail gondermek
//istiyorum
SMTP.Host := Trim(Copy(SmtpHost,30,Length(SmtpHost)));
SMTP.Port := 25;

MailMessage.From.Address := 'gonderenmailadresi@hotmail.com';
//Const satırı altında bulunanan smtpuser deki mail adresini nasıl aşağıya yazdırabilirim.
//mesela neropower@hotmail.com ismli mail adresini aşağıdaki trim(copy satırına nasıl kopyalatıp
//mail gonderebilirim
MailMessage.Recipients.EMailAddresses := Trim(Copy(SmtpUser,30,Length(SmtpUser)));

MailMessage.Subject := 'konu baslıgı';
MailMessage.Body.Text := 'yazacagımız yazı metni';

SMTP.Connect(1000);
SMTP.Send(MailMessage);

if smtp.Connected then smtp.Disconnect;
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
ConnectMail;
end;

end.


** kodları [ CODE ] tagı içine alın.
 
mege24.07.2005 - 21:04:01
akeykum selam

ben sorun göremedim, konu başlığını ve sorunu açıklayın,

hotmail ücretsiz smtp desteği vermez. biraz Arama
 
notname24.07.2005 - 22:32:32
hocam biliyorum hotmail ornek burdaki amaç smtp.host ile smtp.server kısmındaki yazılanları cıkartıcagımız bi baska exe dosyasına yazması asıl amacımız hocam walla ben bişey yazmadan once daima arama butonunu kullanırım ;) bulamassan acarım :)
 
NOT : Bu sayfa google'un siteyi indekslemesi içindir. www.delphiturkiye.com/forum/ adresini kullanınız!
1998-2006 www.delphiturkiye.com