|
|
|
|
|
- Properties specific to emailAttach variables
- Functions that use an emailAttach variable
emailAttach (Variable type) In french: emailAttache
The emailAttach type is used to handle an attachment. You can define and change the characteristics of this attachment using different WLanguage properties. This type of variable is used by Email variables. Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
monEmail is Email
...
monAttache is emailAttach
sFichier is string
sFichier = fSelect("", "", "Sélectionnez le document PDF à joindre...", ...
"Documents PDF (*.PDF)" + TAB + "*.pdf", "*.pdf")
monAttache.Name = fExtractPath(sFichier, fFile + fExtension)
monAttache.Content = fLoadBuffer(sFichier)
monAttache.ContentType = fContentType(sFichier)
monAttache.ContentDescription = "Un document"
Add(monEmail.Attach, monAttache)
MonFichierEmailSourceTemp is string
MonFichierEmailSourceTemp = CompleteDir(fExeDir()) + "EmailSource.eml"
IF fFileExist(MonFichierEmailSourceTemp) THEN
fDelete(MonFichierEmailSourceTemp)
END
EmailReset(MonSourceEmail)
Add(MonSourceEmail.Recipient, SAI_Destinataire)
FOR EACH ROW OF LISTE_Attachement
EmailLoadAttachment(MonSourceEmail, ...
LISTE_Attachement.ValeurAffichée)
END
MonSourceEmail.Sender = "mon_adresse@test.com"
MonSourceEmail.Subject = "Mon sujet"
MonSourceEmail.Message = HTMLToText(SAI_EMAIL_HTML)
EmailImportHTML(MonSourceEmail, SAI_EMAIL, CompleteDir(fExeDir()))
EmailBuildSource(MonSourceEmail)
Properties Properties specific to emailAttach variables The following properties can be used to handle emailAttach variables: | | | Property name | Type used | Effect |
---|
ContentDescription | Character string | Text used to describe the attachment content. | ContentType | Character string | Type of file according to the MIME standard (Multipurpose Internet Mail Extensions). The "Content Type" indicates to the messaging software how the attachment must be interpreted. | Content | Buffer | Content of attachment.Note: If the attachment is filled in manually, don't forget to specify the Nom property, otherwise the image will not be transmitted in the email.. Example: oEmail.Attach[1].Contenu = ...
fLoadBuffer(fDataDir() + ...
["\"] + "Email\" + sLogoSociété)
oEmail.Attach[1].ContentType = "image/gif"
oEmail.Attach[1].Nom = "logo.gif"
| Identifier | Character string | Identifier of attached file included in an HTML message. | Name | Character string | Name of attached file. | Note: Non-Latin characters can be used in the Name and ContentDescriptionproperties.Remarks Functions that use an emailAttach variable The following functions can be used to handle emailAttach variables:
Related Examples:
|
Complete examples (WINDEV): WD Mail
[ + ] This application is an email client developed in WINDEV. It is based on the Email objects. This email client is used to retrieve and send emails by using the POP, IMAP and SMTP protocols. You have the ability to apply filters to the incoming emails. The application can also be used to manage several email accounts. The writing of an email is based on the HTML edit control.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|