Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.12.16;
Скачать: CL | DM;

Вниз

idSmtp   Найти похожие ветки 

 
ak   (2003-10-20 11:09) [0]

здраствуйте мастера...не могу отослать писмо в делфи 7...
плз помогите...если не трудно напишите примерчик(самый простой) отправки письма в делфи7 через компанент IDsmtp...


 
Unknown   (2003-10-20 11:25) [1]

uses
IdSMTP, IdMessage;

procedure SendMail(ASMTPHost, AFrom, ATo, AReplyTo, ASubject: string;
APriority: Integer; ACc, ABcc, Content: string; AWithRecipient: Boolean);
var
MsgSend: TIdMessage;
SMTP: TIdSMTP;

begin
MsgSend := TIdMessage.Create(nil);
SMTP := TIdSMTP.Create(nil);
try
with MsgSend do
begin
Body.Text := Content;
From.Text := AFrom;
ReplyTo.EMailAddresses := AReplyTo;
Recipients.EMailAddresses := ATo; { To: header }
Subject := ASubject; { Subject: header }
Priority := TIdMessagePriority(APriority); { Message Priority }
CCList.EMailAddresses := ACc; {CC}
BccList.EMailAddresses := ABcc; {BBC}
if AWithRecipient then
ReceiptRecipient.Text := From.Text {We set the recipient to the From E-Mail address }
else
ReceiptRecipient.Text := ""; {indicate that there is no receipt recipiant}
end;

SMTP.AuthenticationType := atNone;

//SMTP.Username := SmtpServerUser;
//SMTP.Password := SmtpServerPassword;

{General setup}
SMTP.Host := ASMTPHost;
SMTP.Port := 25;

{now we send the message}
SMTP.Connect;
try
SMTP.Send(MsgSend);
finally
SMTP.Disconnect;
end;
finally
MsgSend.Free();
SMTP.Free();
end;
end;


 
фл   (2003-10-20 11:45) [2]

Спасибо тебе бальшое


 
csr   (2003-10-20 21:02) [3]

А кто знает как послать письмо через idSMTP через прокси (сокс) сервер?



Страницы: 1 вся ветка

Текущий архив: 2003.12.16;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.014 c
3-52101
Cat
2003-11-24 12:26
2003.12.16
На сервере-таблица, клиенту нужно к ней подключиться, нужен путь


3-52095
GIL
2003-11-24 13:22
2003.12.16
Имена полей в SQL


1-52244
Не знающий
2003-12-04 14:19
2003.12.16
Как скопировать файл?


1-52230
_none_
2003-12-04 20:39
2003.12.16
Проблемы с освобождением ресурсов


1-52192
vlv
2003-12-03 13:08
2003.12.16
TreeView. При выборе узла он отображается иконкой с индексом 0.