Xbasic
EMAIL_CLIENT_EXTERNAL Function
Syntax
Result as C = email_client_external([C send_to [,C subject [,C message [,C attachments [,C cc [,C bcc ]]]]]])
Arguments
- send_toCharacter
One or more comma delimited addresses.
- subjectCharacter
The subject of the message.
- messageCharacter
The contents of the message.
- attachmentsCharacter
The name of one or more files to attach to the message.
- ccCharacter
One or more comma delimited addresses.
- bccCharacter
One or more comma delimited addresses.
Description
Display the default external e-mail client. Maximum of 100 recipients.
Discussion
EMAIL_CLIENT_EXTERNAL() opens the default email client and fills in any of the optional arguments that you specify. The default email client is typically Eudora, Netscape Mail, Outlook Express, etc.
The email_client_external() function opens the user's external email client (e.g. Outlook, Eudora, etc.). This function allows you to pass in a message to show in the client. The function uses Widows MAPI to open the external client. If the message you pass in uses HTML syntax, then the email client shows the HTML code, not the rendered HTML message as you would expect. This is, unfortunately, a limitation of MAPI. Build 4345-3709 (June-3-2011) introduces a way to work around this MAPI limitation so that if you pass in an HTML message, it is rendered as HTML. However, the work-around will only work as long as you do not pass in any attachments.
Example
You can only specify multiple attachment files. You can also use the ZIP_FILES()function to create a single zip file containing multiple attachments.
attachments =<<%str% c:\foo.dbf c:\foo.ddd c:\foo.ddm c:\foo.cdx %str% email_client_external("[email protected]","foo", "Test", attachments)
Limitations
Desktop applications only.
See Also