terça-feira, 18 de agosto de 2020

DICAS 3037 - WINDEV TUTORIAL 60 - ENVIAR EMAIL - ADICIONANDO CAMPOS - PARTE A



https://youtu.be/WT07Q2PqH38


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 09:00 do dia 29/08/2020 

DICAS 3037 - WINDEV TUTORIAL 60 - ENVIAR EMAIL - ADICIONANDO CAMPOS - PARTE A 
Tutoriel WINDEV : Leçon 4.9.a. Envoyer un email : Champs

ASSUNTOS

AQUI FOI TOP, POIS APRENDI, QUE POSSO USAR
MUITO OS EDT PRE-PRONTOS PARA USAR , TOP 

EXPLICANDO O QUE SERA FEITO NESSA LICAO
CRIANDO OS CAMPOS NECESSARIOS PARA O ENVIO EMAIL 
   SERVIDOR SMTP
   PORTA
   USUARIO
   SENHA
ALINHANDO OS CAMPOS 
ADICIONANDO OUTROS CAMPOS
   EMAIL REMETENTE
   DESTINATARIO - COMBOX 
   ASSUNTO
   CONTEUDO HTML 
   OPCAO PARA FORMATACAO CONTEUDO
   ANEXO 
   

Video original da Franca

https://youtu.be/DLRuVdD7In4


Playlist Windev TUTORIAL












Lesson 4.9. Sending an email
This lesson will teach you the following concepts
  • How to send an email from a WINDEV application.
  • How to include a supercontrol in a window.
  • How to define the tab order in a window.
  • How to open a non-modal window.
Lesson duration

Estimated time: 20 mn
Previous LessonTable of contentsNext Lesson
Overview
Several WLanguage functions allow you to manage the incoming and outgoing emails. You also have the ability to access the email characteristics:
  • sender, recipients,
  • outgoing date, subject, message,
  • attachments...
WINDEV proposes several methods for managing emails:
  • Management via Lotus Notes, Outloook or MS Exchange:
    • The Lotus Notes or Outlook messaging software: these programs allow you to send and receive emails.
    • The "Simple Mail API" (also called SMAPI or Simple MAPI): this management mode of emails is used by most of the Microsoft applications, especially by Microsoft Exchange.
  • Management via the POP3, IMAP and SMTP protocols:
    • The POP3 protocol: this protocol for receiving emails is recognized by all service providers. It is used to communicate with the server directly, available at your ISP. This protocol is used to list the incoming messages and to read them.
    • The IMAP protocol: this protocol for receiving emails is used to leave the emails the server so that they can be consulted from different messaging clients or webmails.
    • The SMTP protocol: this protocol for sending emails is recognized by all service providers.
In this lesson, we are going to create a window allowing the user to send an email from the "WD Full Application" application. This window is as follows:
Window for sending an email
We are going to use the SMTP protocol. Indeed, this mode is commonly used all over the world.
For more details on the other methods, see Communicating by emails.

Answer

To follow this lesson, you must have followed the lessons of this part until "Lesson 4.7. Printing a list of customers".
A full corrected application project is also available: in WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)".

Example

See the "WD Mail" example (full example supplied with WINDEV) for more details. This example is accessible from the WINDEV home page (Ctrl + <).
A window for sending emails
This window will contain all controls allowing the user to type the different email elements. A "Send" Button control will group all processes used to send the email.

Creating the window

  • Create a new window:
    1. Open the "WD Full Application" project if necessary.
    2. Create a new blank window.
      • Click Create an element among the quick access buttons.
      • The element creation window appears: click "Window" then "Window".
      • The window creation wizard starts.
      • In the "Based on a template" tab pane, select "Use: WINTPL_Template" and validate the wizard.
    3. The window for saving an element is displayed. The title of this window being "Sending an email", its name is automatically proposed: "WIN_Sending_an_email". Validate the proposed information.

Creating the controls used to configure the sending

In a first time, we are going to create all controls for configuring the SMTP server used to send messages. Four edit controls are required:
  • SMTP server,
  • Port of SMTP server,
  • User name,
  • User password.
  • To create the edit control corresponding to the name of SMTP server:
    1. On the "Creation" pane, in the "Usual controls" group, click Creating an edit control.
    2. The control shape appears under the cursor.
    3. Click the top left corner of window: the edit control is automatically created.
    4. Select the control and press Enter. The caption becomes editable. Type "SMTP server" and validate. The control name automatically corresponds to EDT_SMTP_Server.
  • To create the edit control corresponding to the port:
    1. On the "Creation" pane, in the "Usual controls" group, expand "Edit".
    2. Select a preset Integer edit control.
    3. The control shape appears under the cursor.
    4. Click below the "SMTP server" control: the edit control is automatically created.
    5. Select the control and press Enter. The caption becomes editable. Type "Port" and validate. The control name automatically corresponds to EDT_Port.
  • To create the edit control corresponding to the user name:
    1. On the "Creation" pane, in the "Usual controls" group, click Creating an edit control.
    2. The control shape appears under the cursor.
    3. Click below the "Port" control: the edit control is automatically created.
    4. Select the control and press Enter. The caption becomes editable. Type "User" and validate. The control name automatically corresponds to EDT_User.
  • To create the edit control corresponding to the user password:
    1. On the "Creation" pane, in the "Usual controls" group, expand "Edit".
    2. Select a preset "Password" edit control.
    3. The control shape appears under the cursor.
    4. Click below the "User" control: the edit control is automatically created.

      Tip

      The "Password" edit control appears in the editor with a bullet and an eye.
      At runtime, when the user enters their password, the characters will be replaced by bullets. A click on the eye will allow the user to see his password in clear: this allows the user to check his password.
      This feature can be disabled by programming if necessary. See Showing the password for more details.
  • Align the created controls:
    1. Select the four controls.
    2. On the "Alignment" pane, in the "Inside and outside" group, click "Justify (Ins. and Out.)".
      'Alignment' pane
      Interface of the window to create
    3. Save the window ( Save an element or Ctrl + S).

Creating the controls used to type the email characteristics

To write an email, the user must have:
  • A control used to type the sender address.
  • A control used to type or select the recipient address.
  • A control used to type the email subject.
  • A control used to type the email text. The user must have the ability to format the email text.
  • A control used to add attachments.
We are now going to create these controls in our window.
  • To create the edit control corresponding to the sender address:
    1. On the "Creation" pane, in the "Usual controls" group, expand "Edit".
    2. Enter "Email" in the search box at the top of the list of preset controls. Select "eMail edit".
    3. The control shape appears under the cursor.
    4. Click below the "Password" control: the edit control is automatically created.
    5. Select the control and press Enter. The caption becomes editable. Type "Sender" and validate.
  • The control used to type the recipient address must list the addresses of the customers found in the database but it must also allow the user to type another address. To do so, we will use an "Editable combo box" control linked to the Customer data file.
    1. On the "Creation" pane, in the "Usual controls" group, click "Combo Box".
    2. The control shape appears under the cursor.
    3. Click below the "Sender" control: the Combo Box control creation wizard starts automatically.
    4. Select "Display the data found in a file or in an existing query". Go to the next step.
    5. Select the Customer data file. Go to the next step.
    6. The email addresses of customers must be displayed in the control:
      • Uncheck the "CustomerID" item.
      • Check the "Email" item.
      Go to the next step.
    7. The sort item is the "Email" item. Go to the next step.
    8. The return value is the "Email" item. Go to the next step.
    9. Keep the default options. Go to the next step.
    10. In the "Additional parameters" screen, check "Allow input". Indeed, the user must have the ability to type a new email address. Go to the next step.
    11. Modify the name and caption of Combo Box control:
      • The control name is "COMBO_Recipient".
      • The control caption becomes "Recipient".
    12. Validate the wizard. The control is automatically created in the window.
  • To create the edit control corresponding to the email subject:
    1. On the "Creation" pane, in the "Usual controls" group, click Creating an edit control.
    2. The control shape appears under the cursor.
    3. Click below the "Recipient" control: the edit control is automatically created.
    4. Select the control and press Enter. The caption becomes editable. Type "Subject" and validate.
  • For the message body, we will use an HTML Edit control: the user will have the ability to format the email text via a specific toolbar.
    1. On the "Creation" pane, in the "Usual controls" group, expand "Edit".
    2. Enter "HTML" in the search box at the top of the list of preset controls. Select "HTML edit".
    3. The control shape appears under the cursor.
    4. Click below the "Subject" control: the edit control is automatically created.
    5. Enlarge the control in order for several lines to be visible.
    6. Open the control description window (double-click the control).
      • On the "General" tab, modify the mode for displaying the formatting toolbar. This toolbar must always be visible.
      • Validate the control description window.
    7. Reposition the control if necessary in order for the toolbar to be displayed properly.
  • We are going to create a file picker allowing the user to add an attachment. Instead of creating it from scratch, we will use a file preset edit control. Via the popup menu of control ("Browse" option), the user will be able to select the file to attach.
    1. On the "Creation" pane, in the "Usual controls", expand "Edit". The list of preset controls proposed by default is displayed.
    2. Select the "File" control and perform a Drag and Drop toward the "WIN_Sending_an_email" window: drop the control below the "HTML text" control. The file picker is immediately created.
  • Align the different controls found in the window.
    Window for writing emails
W

DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C










Teste

Teste
teste