MailMergeAddAttachmentPattern Method
Adds the attachment pattern to the collection of attachment patterns.

Namespace: MailBee.Mime
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public void AddAttachmentPattern(
	string filenamePattern
)

Parameters

filenamePattern
Type: SystemString
The attachment pattern.
Remarks

The attachment pattern is a string (like !filename!) which denotes a placeholder to be replaced with the actual attachment filename during mail merge operation. When Replace(String, String) method is called with the value of pattern parameter equal to the filename pattern previously added with AddAttachmentPattern(String) method, the file denoted by the path specified in actualValue parameter of Replace(String, String) method will be automatically attached.

It's possible to add multiple attachments with the same pattern. For that, in the value which will replace the pattern you'll need to delimit multiple file paths with ";". Or, you can call AddAttachmentPattern(String) method multiple times to set several different attachment patterns.

Note Note
Pattern of the message template is case-sensitive! For instance, if the pattern is #filename# and the attachment patterns contain #FILENAME# and #filename#, then only #filename# will be replaced with the actual value.
Examples
The example is available in MailMerge class overview.
See Also