Try
Outlook. Connect;
Item:=Outlook. The CreateItem (olMailItem) as _MailItem;
Item. GetInspector;
//handle the recipient
Item. To_ :=lbSENDER. Caption;
If lbCC. Caption<> "' then
Item. CC:=lbCC. Caption;
//processing title: if do not contain RE and reply, plus RE;
S:=lbTITLE. Caption;
If (Pos (' RE: ', UpperCase (S)) & lt;> (1) and (Pos' answer: 'UpperCase (S)) & lt;> (1) and (Pos' answer: 'UpperCase (S)) & lt;> 1) then
S:='RE:' + S;
Item. Subject:=S;
Item. HTMLBody:=Content. The Text;
Item. The Display (False);//open Outlook email window here, contents for Content. The Text
Outlook. Disconnect;
Except,
On E: the System. The Sysutils. Exception do
The begin
Msgbox (' error: error occurs when call Outlook: + E.M essage, 0).
end;
end;
But the problem is coming, here called Outlook opened the email window, but the user can edit the content, after the edit points again to send, how can I get to the final send? (can not be set to read-only or directly to send, because some content is the need of manual entry and validation)
CodePudding user response:
Help to see? Top up...