Develop and Download Open Source Software

Browse Subversion Repository

Diff of /Unit10.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8 by yamat0jp, Thu Dec 31 08:51:02 2015 UTC revision 9 by yamat0jp, Wed Jan 13 11:20:13 2016 UTC
# Line 6  uses Line 6  uses
6    Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Vcl.Controls,    Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Vcl.Controls,
7    IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompEdit,    IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompEdit,
8    IWVCLComponent, IWBaseLayoutComponent, IWBaseContainerLayout,    IWVCLComponent, IWBaseLayoutComponent, IWBaseContainerLayout,
9    IWContainerLayout, IWTemplateProcessorHTML, IWCompButton, IWHTMLControls, System.Variants;    IWContainerLayout, IWTemplateProcessorHTML, IWCompButton, IWHTMLControls,
10      System.Variants,
11      IdIOHandler, IdIOHandlerSocket, IdIOHandlerStack, IdSSL, IdSSLOpenSSL,
12      IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdMessage,
13      IdExplicitTLSClientServerBase, IdMessageClient, IdSMTPBase, IdSMTP;
14    
15  type  type
16    TIWForm10 = class(TIWAppForm)    TIWForm10 = class(TIWAppForm)
# Line 15  type Line 19  type
19      IWButton1: TIWButton;      IWButton1: TIWButton;
20      IWEdit2: TIWEdit;      IWEdit2: TIWEdit;
21      IWLink1: TIWLink;      IWLink1: TIWLink;
22        IdSMTP1: TIdSMTP;
23      procedure IWButton1Click(Sender: TObject);      procedure IWButton1Click(Sender: TObject);
24      procedure IWLink1Click(Sender: TObject);      procedure IWLink1Click(Sender: TObject);
25        procedure IWAppFormCreate(Sender: TObject);
26    public    public
27    end;    end;
28    
# Line 26  implementation Line 32  implementation
32    
33  uses Unit3;  uses Unit3;
34    
35    procedure TIWForm10.IWAppFormCreate(Sender: TObject);
36    begin
37      with IdSMTP1 do
38      begin
39        Password := DM.FDTable3.FieldByName('MAILPASS').AsString;
40        Username := DM.FDTable3.FieldByName('MAILUSER').AsString;
41        Host := DM.FDTable3.FieldByName('HOST').AsString;
42      end;
43    end;
44    
45  procedure TIWForm10.IWButton1Click(Sender: TObject);  procedure TIWForm10.IWButton1Click(Sender: TObject);
46    var
47      s: TIdMessage;
48  begin  begin
49    if DM.FDTable1.Locate('EMAIL;BIRTH',VarArrayOf([IWEdit1.Text,IWEdit2.Text]),[]) = true then    if DM.FDTable1.Locate('EMAIL;BIRTH', VarArrayOf([IWEdit1.Text, IWEdit2.Text]),
50        []) = true then
51    begin    begin
52      //send email      IdSMTP1.Connect;
53        s := TIdMessage.Create(IdSMTP1);
54        try
55          s.ContentType := 'text/plain';
56          s.From.Name := DM.FDTable3.FieldByName('NAME').AsString + ' shop';
57          s.From.Address := '??shop@??.co.jp';
58          s.Recipients.EMailAddresses := DM.FDTable1.FieldByName('EMAIL').AsString;
59          s.Subject := DM.FDTable3.FieldByName('NAME').AsString +
60            ' shop password user ' + DM.FDTable1.FieldByName('NAME').AsString;
61          s.Body.Text := 'site password:' + DM.FDTable1.FieldByName
62            ('PASSWORD').AsString;
63        finally
64          s.Free;
65        end;
66        IdSMTP1.Disconnect;
67      WebApplication.ShowMessage('送信しました');      WebApplication.ShowMessage('送信しました');
68    end    end
69    else    else

Legend:
Removed from v.8  
changed lines
  Added in v.9

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26