Ancak aşağıdaki hatayı alıyorum..Hatayı anladım.Sınıf tipi tanımlamam gerekiyor.Ne yapabilirim..Bazı programlarda sınıf tipi tanımlamadan exception çalışıyor.Ya bu sınıf tipini masıl tanımlamam gerekiyor.Nerede tanımlamalıyım.
error 131 class type require/ class tip tanımlama
error 132 undeclaret identifier message
Kod: Tümünü seç
procedure Tform4.send();
var
mail:string;
begin
StatusMemo.Clear;
//setup SMTP
mail:='Company:'+chr(32)+company.Text+chr(13)+'Contact Person:'+chr(32)+contact.Text+chr(13)+'Phone:'+chr(32)+phone.Text+chr(13)+'Fax:'+chr(32)+fax.Text+chr(13)+'Email:'+chr(32)+email.Text+chr(13)+'Adress:'+chr(32)+adress.Text+chr(13)+'Country:'+chr(32)+country.text+chr(13)+'City:'+chr(32)+city.Text+chr(13)+'Notes:'+chr(32)+chr(13)+notes.Text+chr(13);
smtp.Host:='mail.sirket.com';
smtp.Port:=25;
//setup mail message
MailMessage.From.Address := 'export@sirket.com';;
MailMessage.Recipients.EMailAddresses :='export@gideceksirket.com' ;
MailMessage.Subject := 'custom for order spare list';;
MailMessage.Body.Text :=mail;
way:=way+'order_spare.htm';
TIdAttachment.Create(mailmessage.MessageParts,way);
//send mail
try
try
smtp.Authenticate;
smtp.AuthenticationType :=atlogin;
smtp.Username :='export@sirket.com';
smtp.Password:='............';
SMTP.Send(MailMessage);
except on E:Exception do
StatusMemo.Lines.Insert(0, 'ERROR: ' + E.Message);
end;
finally
if SMTP.Connected then SMTP.Disconnect;
end;