---
title: "MailPrinter.Print"
url: "https://reference.aspose.com/email/net/aspose.email.printing/mailprinter/print/"
product: "Aspose.Email for .NET API Reference"
description: "MailPrinter method. Prints the specified MSG object using the desired format"
---

## Print(MapiMessage, string, PrintFormat) {#print_3}

Prints the specified MSG object using the desired format.

```csharp
public void Print(MapiMessage message, string outputFile, PrintFormat printingFormat)
```

| Parameter | Type | Description |
| --- | --- | --- |
| message | MapiMessage | The MSG file to print. |
| outputFile | String | The output file. |
| printingFormat | PrintFormat | The printing format. |

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentOutOfRangeException | If *printingFormat* is not supported. |
| ArgumentNullException | If one of the arguments is null. |
| InvalidOperationException | If object can't be processed. |

### See Also

* class [MapiMessage](../../../aspose.email.mapi/mapimessage/)
* enum [PrintFormat](../../printformat/)
* class [MailPrinter](../)
* namespace [Aspose.Email.Printing](../../mailprinter/)
* assembly [Aspose.Email](../../../)

---

## Print(MapiMessage, Stream, PrintFormat) {#print_2}

Prints the specified MSG object using the desired format.

```csharp
public void Print(MapiMessage message, Stream outputStream, PrintFormat printingFormat)
```

| Parameter | Type | Description |
| --- | --- | --- |
| message | MapiMessage | The MSG file to print. |
| outputStream | Stream | The output stream. |
| printingFormat | PrintFormat | The printing format. |

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentOutOfRangeException | If *printingFormat* is not supported. |
| ArgumentNullException | If one of the arguments is null. |
| InvalidOperationException | If object can't be processed. |

### See Also

* class [MapiMessage](../../../aspose.email.mapi/mapimessage/)
* enum [PrintFormat](../../printformat/)
* class [MailPrinter](../)
* namespace [Aspose.Email.Printing](../../mailprinter/)
* assembly [Aspose.Email](../../../)

---

## Print(MailMessage, string, PrintFormat) {#print_1}

Prints the specified message object using the desired format.

```csharp
public void Print(MailMessage message, string outputFile, PrintFormat printingFormat)
```

| Parameter | Type | Description |
| --- | --- | --- |
| message | MailMessage | The MSG file to print. |
| outputFile | String | The output file. |
| printingFormat | PrintFormat | The printing format. |

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentOutOfRangeException | If *printingFormat* is not supported. |
| ArgumentNullException | If one of the arguments is null. |
| InvalidOperationException | If object can't be processed. |

### See Also

* class [MailMessage](../../../aspose.email/mailmessage/)
* enum [PrintFormat](../../printformat/)
* class [MailPrinter](../)
* namespace [Aspose.Email.Printing](../../mailprinter/)
* assembly [Aspose.Email](../../../)

---

## Print(MailMessage, Stream, PrintFormat) {#print}

Prints the specified message object using the desired format.

```csharp
public void Print(MailMessage message, Stream outputStream, PrintFormat printingFormat)
```

| Parameter | Type | Description |
| --- | --- | --- |
| message | MailMessage | The MSG file to print. |
| outputStream | Stream | The output stream. |
| printingFormat | PrintFormat | The printing format. |

### Exceptions

| exception | condition |
| --- | --- |
| ArgumentOutOfRangeException | If *printingFormat* is not supported. |
| ArgumentNullException | If one of the arguments is null. |
| InvalidOperationException | If object can't be processed. |

### See Also

* class [MailMessage](../../../aspose.email/mailmessage/)
* enum [PrintFormat](../../printformat/)
* class [MailPrinter](../)
* namespace [Aspose.Email.Printing](../../mailprinter/)
* assembly [Aspose.Email](../../../)


