Applies To:
  • CitectSCADA
  • CitectHMI

Summary:

How do you create an email message in the default mail client and allow the user to edit it before sending?  


Solution:
The attached MailToURL() Cicode function will cause the default mail client to display a new email message dialog. It allows the TO, CC, BCC, SUBJECT, and BODY fields to be filled in with default values. The user may then edit any fields before choosing to send the email. This relies on the default internet browser supporting MAILTO: URLs and a default mail client existing. It has been tested successfully with MS Internet Explorer and Outlook. The ExecEx() Cicode function is also required. See Q4572.

It may be possible to automate the sending of the message using the SendKeys() Cicode function.

The included supporting functions UrlEncode() and UrlEncodeChar() can also be useful for creating valid URLs such as when a file name being sent to a web server may contain illegal characters like spaces.

 

 

Keywords: