//на форме INDI
// IdMessage1
// IdSMTP1 TIdEMailAddressItem *v;
IdMessage1->Body->Text = "TEST"; //TEXT
IdMessage1->Subject = "THEME"; //THEME
IdMessage1->ContentType = "text/plain";
IdMessage1->ContentTransferEncoding = "8bit";
IdMessage1->ReplyTo->Clear();
v = IdMessage1->ReplyTo->Add();
v->Address = "test@mail.ru"; //FROM
IdMessage1->From->Address = "test@mail.ru"; //FROM
IdMessage1->Recipients->Clear();
v = IdMessage1->Recipients->Add();
v->Address = "test@yandex.ru"; //TO
IdMessage1->CharSet="charset=windows-1251";
IdSMTP1->AuthenticationType = atLogin;
IdSMTP1->Host = "smtp.mail.ru";
IdSMTP1->UserId = "test"; //FROM LOGIN
IdSMTP1->Password = "123456"; //FROM PASS
IdSMTP1->MailAgent = "Plisteron's Great Mail Sender";
IdSMTP1->Connect();
IdSMTP1->Authenticate();
IdSMTP1->Send(IdMessage1);
IdSMTP1->Disconnect();