PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Additional controls
  • Outgoing format and page optimization
  • Caution: a single action can be performed at a time on the same page
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Emails the data found in a page currently displayed in the browser.
Note: This function is using the current address of the Web user. The browser will ask for one or more confirmations.
Example
// Sends the content of controls to an email address
PageToEmail("", "someone@somewhere.earth")
// Use the name of the form controls to send the emails
// EDT_Recipient, EDT_Subject, EDT_Request are edit controls
PageToEmail(PAGE_Form, EDT_Recipient, EDT_Subject, EDT_Request, pteAttachment)
Syntax
PageToEmail(<Page Name> , <Destination Email Address> [, <Message Subject> [, <Message Body> [, <Encoding>]]])
<Page Name>: Character string (with or without quotes)
Name of the page whose data must be emailed. If this parameter corresponds an empty string (""), the current page will be taken into account. This page must be currently displayed in the browser.
<Destination Email Address>: Character string (with quotes)
Email address to which the data found in the WEBDEV page will be sent.
<Message Subject>: Optional character string (with quotes)
Subject of email.
<Message Body>: Optional character string (with quotes)
Body of the email.
<Encoding>: Optional character string constant
Type of encoding to use:
pteBody
(default value)
The values of the controls are written in the body of the message.
In this case, <Message Body> is ignored.
pteAttachmentThe values of controls are written in an attachment.
Remarks

Additional controls

The page can contain additional controls specific to WEBDEV (WD_ACTION, WD_BUTTON_CLICK, ...). These controls are required by WEBDEV in order to operate properly. The value of these controls is also returned to the ASP server.

Outgoing format and page optimization

The values are returned by pairs in the following format: (<Control Alias>, <Control Value>).
We recommend that you use "Compress the names of controls (..Alias)".
Reminder: This option is available in the characteristics for advanced optimization of the HTML code:
  • Configuration of projects: "Project" tab of the project description
  • Configuration of a page: "Advanced" tab of the page description

Caution: a single action can be performed at a time on the same page

PageToEmail triggers an action on the page displayed in the browser of Web user. However, the Internet browsers allow a single action on the page per process.
Consequences: PageToEmail cannot be used in a code triggering an action (automatically or not). This function is ignored:
  • In the click code of a "submit" button (or in a procedure called by the click code of this button)
  • In the click code of an "other" button whose action differs from "none" (or in a procedure called by the click code of this button)
  • If it is followed by PageSubmit or by EmailOpenMail (in the current process, in a procedure called by the current process or in another process called by Execute).
Components
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment