Adds one or more file attachments to the mail message.

*** Content type is optional and only used  when using the .NET object
o.AddAttachment(lcFileName, lcContentType)


Name of the file to send to the server. Should be a fully qualified filename

In .NET Mode you can also pass an System.Net.Mail.Attachment object.

Optional - In .NET mode you can optionally specify the content type which gets embedded with the attached file. Usually this isn't necessary as most mail clients will sniff the content type based on the file extension.

This parameter is ignored if set in classic mode.


Do not use this method if you are making multiple SendMessage() (rather than SendMail) calls. Attachments added in .NET mode will not work for multiple sends of the same attachment object instance.

If you use SendMessage() to resend on the same connection and you need to add attachments add them with the .cAttachment property instead.

See also:

Class wwSmtp | wwSMTP::cAttachment

© West Wind Technologies, 1996-2024 • Updated: 11/29/2016
Comment or report problem with topic