MailMessage.Save
Contents
[
Hide
]Save(string)
Save message as a file
public virtual void Save(string fileName)
Parameter | Type | Description |
---|---|---|
fileName | String | Name of a file to save message. |
See Also
- class MailMessage
- namespace Aspose.Email
- assembly Aspose.Email
Save(string, SaveOptions)
Save message as a file with additional options.
public virtual void Save(string fileName, SaveOptions options)
Parameter | Type | Description |
---|---|---|
fileName | String | Stream into which message is saved. |
options | SaveOptions | Additional options for savingSaveOptions . |
Examples
The following example shows how to save an email message as HTML with embedded images.
[C#]
var fileName = "EmailWithAttachEmbedded.eml";
var eml = MailMessage.Load(fileName);
var options = new HtmlSaveOptions()
{
ResourceRenderingMode = ResourceRenderingMode.EmbedIntoHtml
};
eml.Save($"{fileName}.html", options);
[Visual Basic]
Dim fileName = "EmailWithAttachEmbedded.eml"
Dim eml = MailMessage.Load(fileName)
Dim options = New HtmlSaveOptions() With {
.ResourceRenderingMode = ResourceRenderingMode.EmbedIntoHtml
}
eml.Save($"{fileName}.html", options)
See Also
- class SaveOptions
- class MailMessage
- namespace Aspose.Email
- assembly Aspose.Email
Save(Stream, SaveOptions)
Save message as a stream with additional options.
public virtual void Save(Stream stream, SaveOptions options)
Parameter | Type | Description |
---|---|---|
stream | Stream | Stream into which message is saved. |
options | SaveOptions | Additional options for savingSaveOptions . |
See Also
- class SaveOptions
- class MailMessage
- namespace Aspose.Email
- assembly Aspose.Email
Save(Stream)
Save message as a stream
public virtual void Save(Stream stream)
Parameter | Type | Description |
---|---|---|
stream | Stream | Stream into which message is saved |
See Also
- class MailMessage
- namespace Aspose.Email
- assembly Aspose.Email