---
title: c SMB
description: Available connectors
documentId: ipaas-smb
locale: en-US
---

The [**SMB**](https://camel.apache.org/components/4.10.x/smb-component.html) component allows the flow to integrate with directories shared via SMB/CIFS protocol, enabling files to be sent directly to a remote server.

The integration supports sending multiple files in a single execution and allows configuring control parameters and message headers to customize the processing and routing of sent files.

**URI syntax**: `smb:hostname:port/shareName`

## Main fields

*Path parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `hostname` (common)  | (required) The hostname or IP address of the share. | —  | String |
| `port` (common)      | The port number of the share.                           |445| int    |
| `shareName` (common) | (required) The name of the shared directory.                 | —  | String |

*Query parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `password` (security) | The password to access the share.                      | —  | String |
| `username` (security) | The username required to access the share. | —  | String |

## Example

The flow below sends a file to an SMB server:

<Steps>
  <Step>
   The flow is triggered by a GET request on the `/test` endpoint.
  </Step>
  <Step>
    The body (setBody) of the message is set to the text `It worked!`.
  </Step>
  <Step>
    The header (setHeader) `CamelFileName` is set to `poc-smb.txt`, indicating the name of the file that will be created/sent.
  </Step>
    <Step>
   The content is sent to an SMB share (Windows File Share) at address `server-example`, port `445`, in the `myshare` share. The parameters are the `username` and `password` credentials.
  </Step>
  <Step>
   After sending, a log is recorded with the message `Successfully completed`.
  </Step>
 </Steps>


```yaml
- from:
  uri: rest:get:/test
  steps:
    - setBody:
      constant: It worked!
    - setHeader:
      name: CamelFileName
      constant: poc-smb.txt
    - to:
      uri: "smb:server-example:445/myshare"
      parameters:
      username: yourusername
      password: yourpassword
    - log:
      message: Successfully completed
```

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/smb_connector_f3e84abca7.png)
