MsgAttachmentCollection.Add Method
Namespace: Rebex.Mail
Assembly: Rebex.Msg.dll (version 7.0.9313)
Add(String, String)
Adds an attachment to the collection.
Declaration
public MsgAttachment Add(string filePath, string displayName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| String | filePath | Path to a file to provide data for the attachment. |
| String | displayName | Display name of the attachment. |
Returns
| Type | Description |
|---|---|
| MsgAttachment | Created attachment object. |
Add(Stream, String, String)
Adds an attachment to the collection.
Declaration
public MsgAttachment Add(Stream input, string fileName, string displayName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | input | Stream from which the data for the attachment will be read. |
| String | fileName | File name of the attachment. |
| String | displayName | Display name of the attachment. |
Returns
| Type | Description |
|---|---|
| MsgAttachment | Created attachment object. |