Home > Back-end >  Call the Outlook editing and sending mail, how to get to the final email content?
Call the Outlook editing and sending mail, how to get to the final email content?

Time:09-16

Auxiliary processing tool, I made a mail from the business public mailbox receive mail, and stored in the database, the user can choose the quick reply content, such as "has been processed" "has been forwarded to XXX for processing" and so on, I am reply by calling the Outlook to write the email, open the edit window, after the user to edit the email click on the send button, but I hope that users will eventually send the content of the records in the database, so that the registration by E-mail content,
 
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...
  • Related