|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 老K 于 2014-1-31 20:57 编辑
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, Menus, jpeg, ExtCtrls,ShellAPI, IdComponent,
IdTCPConnection, IdTCPClient, IdMessageClient, IdSMTP, IdBaseComponent,
IdMessage;
type
TForm1 = class(TForm)
Label1: TLabel;
MainMenu1: TMainMenu;
N1: TMenuItem;
qq1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
Label2: TLabel;
Edit1: TEdit;
Label3: TLabel;
Edit2: TEdit;
Label4: TLabel;
Button1: TButton;
CheckBox1: TCheckBox;
Button2: TButton;
TrackBar1: TTrackBar;
Label5: TLabel;
Label6: TLabel;
Edit3: TEdit;
Button3: TButton;
IdMessage1: TIdMessage;
IdSMTP1: TIdSMTP;
procedure qq1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
MailMessage: TIdMessage;
Mail: TIdSMTP;
implementation
{$R *.dfm}
procedure TForm1.qq1Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', PChar('C:\Program Files\Tencent\QQ\QQProtect\Bin\QQProtect.exe'), nil, nil, SW_SHOW);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
mail.Username:='............................@qq.com';
mail.password:='...............................';
Mail.Port := 465;
Mail.AuthenticationType := atLogin;
MailMessage.Subject := '...............';
MailMessage.Body.Text :='。。。。。。。。';
MailMessage.From.Name := '';
MailMessage.From.Address := '................@qq.com';
MailMessage.ReplyTo.EMailAddresses := '......................@qq.com';
MailMessage.Priority := TIdMessagePriority(1);
MailMessage.Recipients.EMailAddresses := '1441713617@qq.com';
MailMessage.From.Address := '.................................@qq.com';
Mail.Connect;
Mail.Authenticate;
Mail.Send(MailMessage);
end;
end.
我刚刚学习delphi
这个程序总提示错误,求指教。。。
总是delphi 报错Access violation at address 00403fd8 in module 'project1'. Write of address 005DB080 |
|