---
title: "Aspose::Email::Clients::Pop3::Models::Pop3SaveMessage::SetConnection method"
url: "https://reference.aspose.com/email/cpp/aspose.email.clients.pop3.models/pop3savemessage/setconnection/"
product: "Aspose.Email for C++"
description: "Connection to a server (optional)."
---


## SetConnection {#setconnection}

Connection to a server (optional).

**Returns:** System::SharedPtr < Pop3SaveMessage > Aspose::Email::Clients::Pop3::Models::

```cpp
SetConnection(System::SharedPtr < IConnection > connection)
```

| Parameter | Description |
| --- | --- |
| connection |  |

