, hvordan til at sende en e - mail, med tillæg af perspektiver.,, hele demo foderstoffer (*. dpr, *. pas osv.) er i maildemo. zip.,,, en enhed, der kan gøre det, er ridset nedenfor:,,,,, outlookmail enhed; interface, anvender, vinduer, beskeder, sysutils, klasser, grafik, kontrol, formularer, dialoger,,, outlook8, oleserver, comobj, activex,,,,,,,,, tmailrecord = record,, filetoattach: string,,, mailto: string;,, cc: string;,, kontoret for virksomhedssamarbejde: om: streng snor,,,,,, - organ: string,,,,,,, procedure outlookmailproc (maildetail: tmailrecord);,,,, gennemførelse, procedure outlookmailproc (maildetail: tmailrecord), var objoutlook,,,- outlookapplication;,, currentinterface: iunknown;,, activeapplication: hresult;,, currentmailitem: mailitem;,, mailinspector: inspektør;,, begynder, activeapplication: = getactiveobject (class_outlookapplication, nul, currentinterface), hvis activeapplication = mk_e_unavailable så, objoutlook: = cooutlookapplication. skabe,,,, begynder, olecheck (activeapplication);,, olecheck (currentinterface. queryinterface (outlookapplication, objoutlook),,,,, currentmailitem: = objoutlook. createitem (0), som mailitem;,, currentmailitem.to _: = maildetail. mailto;,, hvis maildetail. filetoattach < > "så, currentmailitem. bilag. der tilsættes (maildetail. filetoattach, emptyparam, emptyparam, emptyparam), currentmailitem. cc: = maildetail. cc;,, currentmailitem. bre: = maildetail. bre;,, currentmailitem. emne: = maildetail. emne;,, currentmailitem. organ: = maildetail.,,,,,,, mailinspector: = currentmailitem. getinspector;,, mailinspector skærm (falsk.), showmessage ('), venter du, til at afslutte den post - processen.klik på okay når! «);,, objOutlook.Quit;,, objOutlook := nil;,, end;,,,,, end.,,,, Unit for the Demo:,, =================,, unit MailDemo;,,, interface,,, uses,, Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,,, StdCtrls, Db,qrprntr, Qrctrls,qrExtra,qrexport, DBTables, QuickRpt, ExtCtrls;,,, type,, TForm1 = class(TForm),, Button1: TButton;,, EditMailTo: TEdit;,, Label1: TLabel;,, Label2: TLabel;,, EditSubject: TEdit;,, Label3: TLabel;,, EditFileToAttach: TEdit;,, Memo1: TMemo;,, Label4: TLabel;,, Label5: TLabel;,, EditCC: TEdit;,, procedure Button1Click(Sender: TObject);,, private,, { Private declarations },, public,, { Public declarations },, end;,,, var,, Form1: tform1;,,, gennemførelse,,, anvender outlookmail;,,, ($r *. dfm}, i denne crlf = chr (13) + chr (10), er proceduren tform1. button1click (afsender: tobject);,, var, maildetail: tmailrecord;,, x: heltal, begynder, maildetail. filetoattach: = editfiletoattach. tekst;,, maildetail. mailto: = editmailto. tekst;,, maildetail. cc: = editcc. tekst;,, maildetail. emne: = editsubject. tekst;,, maildetail. organ: = '«, for x: = 0 til memo1.lines.count-1 gør, maildetail. organ: = maildetail. krop + memo1. linjer [x] + crlf;,, outlookmailproc (maildetail);,,,,,,,,,.,,
at sende e - mail med tillæg af perspektiver.
Next Page:dato /tidspunkt