|
|
|
|
- Propiedades específicas de las variables emailAttach
- Funciones que manipular un emailAttach Variable
emailAttach (Tipo de Variable)
El tipo emailAttach se usa para manipular un archivo adjunto. Las características de este accesorio pueden definirse y modificarse utilizando diferentes propiedades de WLanguage. Este tipo de Variable es utilizado por Email Variable s. Observación: Para obtener más información sobre la declaración de este tipo de variable y el uso de propiedades WLanguage, consulte Declarar una variable.
// Attach an attachment to an email myEmail is Email ... myAttach is emailAttach sFile is string // Select the file to attach sFile = fSelect("", "", "Select the PDF document to attach...", ... "PDF documents (*.PDF)" + TAB + "*.pdf", "*.pdf") // Build the emailAttach variable myAttach.Name = fExtractPath(sFile, fFile + fExtension) myAttach.Content = fLoadBuffer(sFile) myAttach.ContentType = fContentType(sFile) myAttach.ContentDescription="A document" // Add the attachment Add(myEmail.Attach, myAttach) // Second method with EmailLoadAttachment MyTempSourceEmailFile is string MyTempSourceEmailFile = CompleteDir(fExeDir()) + "EmailSource.eml" IF fFileExist(MyTempSourceEmailFile) THEN fDelete(MyTempSourceEmailFile) END EmailReset(MyEmailSource) // Build the email in an EML file (email source) // LIST_Attachment contains the list of my attachments Add(MyEmailSource.Recipient, EDT_Recipient) FOR EACH ROW OF LIST_Attachment EmailLoadAttachment (MyEmailSource, ... LIST_Attachment.DisplayedValue) END MyEmailSource.Sender = "my_address@test.com" MyEmailSource.Subject = "My subject" MyEmailSource.Message = HTMLToText(EDT_EMAIL_HTML) EmailImportHTML(MyEmailSource, EDT_EMAIL, CompleteDir(fExeDir())) EmailBuildSource(MyEmailSource)
Observaciones Propiedades específicas de las variables emailAttach Las siguientes propiedades pueden utilizarse para manipular variables de tipo emailAttach: | | | Nombre de la propiedad | Tipo utilizado | Efecto |
---|
ContentDescription | Cadena de caracteres | Texto utilizado para describir el contenido del archivo adjunto. | ContentType | Cadena de caracteres | Tipo de archivo según el estándar MIME (Multipurpose INTERNET Mail Extensions). El "Tipo de contenido" indica al software de mensajería cómo debe interpretarse el archivo adjunto. | Contenido | Buffer | Contenido del archivo adjunto.Observación: Si el archivo se adjunta manualmente, debe especificar la propiedad Name, de lo contrario la imagen no se enviará junto con el correo electrónico. Ejemplo: oEmail.Attach[1].Content = ... fLoadBuffer(fDataDir() + ... ["\"] + "Email\" + sCompanyLogo) oEmail.Attach[1].ContentType = "image/gif" oEmail.Attach[1].Name = "logo.gif"
| Identificador | Cadena de caracteres | Identificador del archivo adjunto incluido en un mensaje HTML. | denominar | Cadena de caracteres | Nombre del archivo adjunto. | Observación: Puede utilizar caracteres no latinos en las propiedades Name y ContentDescription .Funciones que manipular un emailAttach Variable Las siguientes funciones manipulan variables de tipo emailAttach:
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|