AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Comunicación / Gestión de correos electrónicos
  • Handling the messages and their attached files
  • Reminder
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Copies the attachment of current email onto the user computer (locally).
WINDEVReports and QueriesUser code (UMC)
FOR I = 1 TO Email.NbAttach
FileToSave = fSelect(("", "", "Name of the file to save", ...
"All files (*.*)" + TAB + "*.*", "", fselCreate)
EmailSaveAttachment(Email.Attach[I], FileToSave)
END
WINDEVWEBDEV - Server codeReports and QueriesJavaUser code (UMC)Ajax
sAttachmentDir is string = ...
CompleteDir(SysDir(srCommonAppData)) + "MyProject\Attachements\"
IF NOT fDirectoryExist(sAttchmentDir) THEN fMakeDir(sAttachmentDir)
 
FOR I = 1 TO Email.NbAttach  
IF NOT EmailSaveAttachment(Email.Attach[I]), ...
sAttachmentDir + Email.Attach[I]) THEN Error(ErrorInfo())
END
Syntax
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppAndroidAndroid Widget iPhone/iPadIOS WidgetMac CatalystUser code (UMC)Ajax

Saving a file attached to an emailAttach variable Hide the details

<Result> = EmailSaveAttachment(<Attached file> , <Name of copied file>)
<Result>: Boolean
  • True if the attached file was copied onto the local computer.
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Attached file>: emailAttach variable
Name of emailAttach variable containing the description of attached file.
<Name of copied file>: Character string
Name and full or relative path of file copied onto the local computer.

Saving a file attached to the Email structure Hide the details

<Result> = EmailSaveAttachment(<Name of attached file> , <Name of copied file>)
<Result>: Boolean
  • True if the attached file was copied onto the local computer.
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Name of attached file>: Character string
Logical name of attached file, obtained in the Email.Attach variable.
<Name of copied file>: Character string
Name and full or relative path of file copied onto the local computer.
Remarks

Handling the messages and their attached files

We recommend that you save the messages and their attached files on the local drive (or on a server drive), then delete them from the server. This operation is used to:
  • reduce the size of the mailbox on the server,
  • improve and speed up the communications: only the new messages will be read on the server.

Reminder

Email structure: The following variables contain information about the files attached to the current message:
  • Email.NbAttach: number of attachments.
  • Email.Attach: array containing the name of the files attached to the current message.
Email variable: The files attached to the current message are returned by Email..Attach (array containing the name of the files attached to the current message).
Component: wd290com.dll
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/06/2023

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