AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Gestión de correos electrónicos
  • Creating a profile
  • Timeout
  • Managing emails in asynchronous mode
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Allows you to access data handled by the Outlook messaging software (emails, contacts, groups of contacts, tasks, appointments and folders). This function is equivalent to OutlookStartSession.
Attention This function does not provide access to the various data handled by Outlook Express e-mail software.
Note: When using the EmailStartOutlookSessionfunction, the current directory is automatically modified by Outlook.
Ejemplo
// Start the session
IF EmailStartOutlookSession("MyProfile") <> 0 THEN
Info("Session started")
ELSE
ErrorInfo()
END
nOutlookSessionID is int
// Start the Outlook session with the default profile
nOutlookSessionID = EmailStartOutlookSession("")
// Session started?
IF nOutlookSessionID = 0 THEN
// Failure starting the session
Error("Failure starting the Outlook session", ErrorInfo())
ELSE
// Process
Info("List of email folders of Outlook:", ...
EmailListFolder(nOutlookSessionID))
// Close the session
EmailCloseSession(nOutlookSessionID)
END
Sintaxis

Starting the Outlook session Ocultar los detalles

<Result> = EmailStartOutlookSession(<Profile>)
<Result>: Integer
  • Session identifier.
  • 0 (or False) if an error occurred. The ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo with the errMessage constant.
<Profile>: Character string
Identifies the connection profile (see Notes).
If this parameter corresponds to an empty string (""):
  • if several profiles are defined on the current computer, EmailStartOutlookSession displays a window containing all profiles among which the user can choose his own profile.
  • if a single profile is defined on the current computer, EmailStartOutlookSession automatically selects this profile.

Starting the Outlook session while specifying the management mode of contacts/participants Ocultar los detalles

<Result> = EmailStartOutlookSession(<Profile> , <Asynchronous> [, <Start options>])
<Result>: Integer
  • Session identifier.
  • 0 (or False) if an error occurred. The ErrorOccurred variable is set to True. To get more details on the error, use ErrorInfo with the errMessage constant.
<Profile>: Character string
Identifies the connection profile (see Notes).
If this parameter corresponds to an empty string (""):
  • if several profiles are defined on the current computer, EmailStartOutlookSession displays a window containing all profiles among which the user can choose his own profile.
  • if a single profile is defined on the current computer, EmailStartOutlookSession automatically selects this profile.
<Asynchronous>: Constant or boolean
Mode for sending the emails:
emailAsynchronous or TrueThe outgoing emails must be transmitted in asynchronous mode (see the Notes).
emailSynchronous or False
(Default value)
The outgoing emails must be transmitted in synchronous mode (see the Notes).
WINDEV This parameter must correspond to emailSynchronous or False.
<Start options>: Optional integer constant
Mode for starting the Outlook session:
outlookAPTWithContact
(Default value)
The AppointmentXXX functions will list the contacts associated with the appointments in the mAppointment.Participant variable (see Appointment structure).
outlookAPTWithParticipantThe AppointmentXXX functions will list the participants associated with the appointments in the following variables:
  • mAppointment.Participant
  • mAppointment.ParticipantCc
  • mAppointment.ParticipantBcc
For more details, see Appointment structure.
Observaciones

Creating a profile

To start a new session with Outlook, a "profile" must be defined. This "profile" is defined in the configuration of the Internet connection with Outlook.
To create a profile:
  1. Start Outlook.
  2. In the "Choosing a profile" window, click [New].
  3. Select the "Microsoft Exchange Server" service.
  4. Give a name to the profile.
  5. Enter the name of Microsoft Exchange server.

Timeout

The timeout can be set using EmailSetTimeOut.
WEBDEV - Código ServidorAjax

Managing emails in asynchronous mode

The email functions are locking functions by default. Which means that no other code can be run during their execution. The program will resume only when the current Email functions have been run.
WEBDEV gives you the ability to manage the emails in asynchronous mode. This mode allows your sites to send emails without locking the execution of other processes.
To use the asynchronous mode, you must:
  1. Uncheck "Disable the email spooler" in the WEBDEV administrator ("Advanced" tab).
  2. Enable the asynchronous mode when the SMTP session is started (by EmailStartSMTPSession or EmailStartSession).
  3. All outgoing emails will be transmitted to a "spooler". Emails are queued up before being sent.
Executing Email functions does no longer block the rest of the program. EmailStatus is used to determine the status of an email.
Note: If the WEBDEV administrator is closed, the email spooler is cleared. Pending emails are not sent and are removed from the spooler.
If "Disable the email spooler" is checked while emails are still found in the spooler, these emails will not be lost: the administrator keeps sending them but no new email is accepted by the spooler.
Caution: Asynchronous mode can only be used when starting a session on an SMTP server (EmailStartSMTPSession function to send emails, or EmailStartSession). The asynchronous mode is ignored in all other cases.
Componente: wd300com.dll
Versión mínima requerida
  • Versión 11
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/03/2025

Señalar un error o enviar una sugerencia | Ayuda local