Attachments Property

Official Content
This documentation is valid for:

Returns the paths to the files attached in a mail message and contains methods to add or remove attachments.



Type Returned:

    Is a variable based on the MailMessage Data Type.


Extended Data Types: MailMessage
Generators: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)


When you receive a mail, the Attachment property contains the paths to the files attached to it.

If you need to add attachments to a mail message that you want to send, you can use the Add method as shown:



    Is the path where the file to be attached is located (including the file name and extension).


  • If a complete route is not specified when sending a message, the attached files will be searched for in the directory specified by the AttachDir property.
  • To provide compatibility between the UNIX and Windows environments, you can use either the slash (/) or the backslash (\) as directory delimiters in the route of the attached files.



See Also

AttachDir Property
MailMessage Data Type
StringCollection Data Type