Tuto WEBDEV 25

220 Part 5: Let’s continue the development • the code for sending the email: // Send the email IF EmailSendMessage(MySession,Suggestion) = False THEN ToastDisplay("Sending error",ErrorInfo()) ELSE ToastDisplay("Thank you for your suggestion.") END The email is sent by EmailSendMessage . All you have to do is pass in parameter the variable containing the characteristics of SMTP session and the variable containing the characteristics of email to send. If the email is sent, a Toast message is displayed, indicating that the email was sent. A Toast message corresponds to a furtive message. • the code for closing the SMTP session: // Close the SMTP session EmailCloseSession(MySession) This code closes the session with EmailCloseSession . Close the code editor. ▶ Save the page and its code ( or Ctrl + S). Remark The process for sending emails is given for information only. In a real site, we would have to check the parameters typed, process the errors, save a log file, ... Improving the page We are going to improve our popup page: • Add a Button control to close this popup page. • Start the popup page from the "PAGE_List_of_products" page. Closing the popup page ▶ To add a Button control to close the popup page: 1. On the "Creation" pane, in the "Usual controls" group, click "Button".

RkJQdWJsaXNoZXIy NDQ0OA==