Форум: "Сети";
Текущий архив: 2005.02.13;
Скачать: [xml.tar.bz2];
ВнизChaser: Помогите! Не работает отправка е-mail на Delphi Найти похожие ветки
← →
OneFragLeft © (2004-11-28 00:58) [40]>Serega (28.11.04 0:43) [37]
procedure Indy_SendMail(const sSubj,sTo,sFromAddr,sReplyTo,sAttach:string;LBody:TStrings);
var
FidMess:TidMessage;
Fid_SMTP:TidSMTP;
begin
try
Fid_SMTP:=TIdSMTP.Create(Application.MainForm);
FidMess:=TIdMessage.Create(Fid_SMTP);
except
if Fid_SMTP<>nil then FreeAndNil(Fid_SMTP);
end;
with FidMess do
begin
Subject:="Тест";
From.Text:=sFromAddr;
Recipients.EMailAddresses:=sTo;
NoEncode:=True;
if LBody<>nil then Body.Text:=pchar(LBody.Text);
if sReplyTo<>"" then ReplyTo.EMailAddresses:=sReplyTo;
if FileExists(sAttach) then TIdAttachment.Create(MessageParts,sAttach);
end;
with Fid_SMTP do
begin
ReadTimeout:=60000;
Port:=25;
Host:="smtp.mail.ru";
if not Connected then
try
Connect;
Send(FidMess);
finally
if Connected then Disconnect;
FreeAndNil(FidMess);
FreeAndNil(Fid_SMTP);
end;
end;
end;Indy_SendMail("", "MYLO@mail.ru", "SHILO@mail.ru", "SHILO@mail.ru", "",Form1.Memo1.Lines);
← →
Serega (2004-11-28 01:01) [41]> OneFragLeft © (28.11.04 00:58) [40]
na idsmtp krome timeout, port, i host, drugie properitis ne stavatsa......!?
← →
OneFragLeft © (2004-11-28 01:03) [42]Нет, так работает.
Только строчку надо закомментироватьValues["X-Library"] := gsIdProductName + " " + gsIdVersion ;
Которая находиться в IdMessage.pas
← →
Serega (2004-11-28 01:14) [43]stranno, moi Delphi(7) soprativlaetsa.....
← →
OneFragLeft © (2004-11-28 01:15) [44]Каким образом?
← →
Serega (2004-11-28 01:22) [45]strochku v idmessage.pas sakomentiroval
**************idmessage.pas**********************************
Values["X-Priority"] := IntToStr(Ord(Priority) + 1); {do not localize}
// Values["X-Library"] := gsIdProductName + " " + gsIdVersion ; {do not localize}
****************************************************************
v object-ispector dla idsmtp stoit:
Authetification Type : atNone
Host : smtp.mail.ru
Port : 25
ReadTimeout : 60000
Pri Opravke pochti vidaet exception:
form1.IdSMTP1.Connect();
try
form1.IdSMTP1.Send(idmessage2);
except
on E : EidException do showmessage("Scheise beim Senden der Email an den Server" + E.Message + E.ClassName);
end; // try
form1.IdSMTP1.Disconnect;
Nesnaju s chem eto svasano.....
Project rebuilt delal....
← →
OneFragLeft © (2004-11-28 01:25) [46]IDMessage - на форме?
← →
Serega (2004-11-28 01:28) [47]da....
idMessage2 na forme, no sasdajotsa v Procedure....:)
procedure SendMyMail();
var
IdMessage2: TIdMessage;
begin
idmessage2 := TiDMessage.Create(nil);
← →
OneFragLeft © (2004-11-28 01:28) [48]Постучи в аську: 303069836
Страницы: 1 2 вся ветка
Форум: "Сети";
Текущий архив: 2005.02.13;
Скачать: [xml.tar.bz2];
Память: 0.53 MB
Время: 0.147 c