> See the [IMAP/SMTP documentation](/docs/imap-smtp/) for a developer guide.

MailSlurp gives you SMTP and IMAP access to email addresses that you create. For best results **use the SMTP_INBOX** type email mailbox when you create the address.
You can get SMTP or IMAP access details inside the dashboard or by using the API to get your credentials.

## Find your SMTP IMAP settings

Login to [your [MailSlurp](/api/) account](https://app.mailslurp.com/login/) or create a [free account](https://app.mailslurp.com/sign-up/). On the dashboard homescreen you will see a tab of account details. Click the **SMTP/IMAP** tab to reveal your SMTP IMAP settings.

![imap-access](/assets/imap-smtp-access.jpg)

## Server overview

Here are the main URLs for IMAP and SMTP access:

| Protocol | Host              | Port | TLS   | Description          |
| -------- | ----------------- | ---- | ----- | -------------------- |
| SMTP     | mx.mailslurp.com  | 25   | false | SMTP server          |
| SMTP     | mx.mailslurp.com  | 2525 | false | SMTP server          |
| SMTP     | mailslurp.mx      | 587  | true  | SMTP server (secure) |
| SMTP     | mailslurp.mx      | 2587 | true  | SMTP server (secure) |
| SMTP     | mailslurp.mx      | 465  | true  | SMTP server (secure) |
| SMTP     | mailslurp.mx      | 2465 | true  | SMTP server (secure) |
| IMAP     | mailslurp.click   | 1143 | false | IMAP server          |
| HTTP(S)  | api.mailslurp.com | 80   | true  | REST API server      |

Note that only inboxes created with the `SMTP_INBOX` mailbox type allow access via SMTP and IMAP.
See the guide for [differences in inbox type](/guides/smtp-vs-http-email-inboxes/).

### Get IMAP / SMTP access by curl

You can also access your SMTP or IMAP settings using the command line with [your API_KEY](https://app.mailslurp.com/login/).

```bash
curl api.mailslurp.com/inboxes/imap-smtp-access -Hx-api-key:YOUR_API_KEY
{"smtpServerHost":"mx.mailslurp.com","smtpServerPort":2525,"smtpUsername":"---","smtpPassword":"---","imapServerHost":"mailslurp.click","imapServerPort":1143,"imapUsername":"---","imapPassword":"---"}
```

### Get IMAP / SMTP access in code and tests

There are methods in every [offical code library](/docs/) like `getImapSmtpAccessDetails` that return the SMTP and IMAP settings for your account. Use these details to configure SMTP clients in your applications or tests.

```javascript
const { MailSlurp } = require("mailslurp-client");
const nodemailer = require("nodemailer");
const apiKey = process.env.API_KEY;
const mailslurp = new MailSlurp({ apiKey });

// get access details for smpt server
const server = await mailslurp.getImapSmtpAccessDetails();

// use details to configure SMTP client like NodeMailer
const opts = {
  host: server.smtpServerHost,
  port: server.smtpServerPort,
  secure: false, // Disable tls recommended
  auth: {
    user: server.smtpUsername,
    pass: server.smtpPassword,
    type: "PLAIN", // Note the use of PLAIN AUTH
  },
};
const transport = nodemailer.createTransport(opts);
```

### CSharp example

```csharp
using System;
using System.Net;
using System.Net.Mail;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
using Xunit;

namespace SmtpService.Tests
{
    public class UnitTest1
    {
        [Fact]
        public void CanSendEmailWithMailSlurpSmtp()
        {
            var apiKey = Environment.GetEnvironmentVariable("API_KEY")
                         ?? throw new ArgumentNullException("Missing API_KEY environment variable containing MailSlurp key");

            // configure client
            var config = new Configuration();
            config.ApiKey.Add("x-api-key", apiKey);
            var inboxController = new InboxControllerApi(config);

            // create an smtp inbox
            var inbox = inboxController.CreateInboxWithOptions(new CreateInboxDto(
                inboxType: CreateInboxDto.InboxTypeEnum.SMTPINBOX
            ));
            Assert.Contains("@mailslurp.mx", inbox.EmailAddress);

            // get smtp host, port, password, username etc
            var imapSmtpAccessDetails = inboxController.GetImapSmtpAccess();
            var smtpClient = new SmtpClient(imapSmtpAccessDetails.SmtpServerHost)
            {
                Port = imapSmtpAccessDetails.SmtpServerPort,
                Credentials = new NetworkCredential(userName: imapSmtpAccessDetails.SmtpUsername, password: imapSmtpAccessDetails.SmtpPassword),
                // disable ssl recommended
                EnableSsl = false
            };

            // send email to inbox
            smtpClient.Send(from: "test@external.com", recipients: inbox.EmailAddress, subject: "This inbound", body: "Hello");

            // wait for email to arrive
            var waitController = new WaitForControllerApi(config);
            waitController.WaitForLatestEmail(inboxId: inbox.Id, timeout: 30_000);
        }
    }
}
```

## More information

- [Configure email clients like Outlook, Gmail, Thunderbird, Mail](/guides/configure-smtp-email-clients/)
- [Differences between HTTP and SMTP inboxes](/guides/smtp-vs-http-email-inboxes/)

## Next steps after SMTP and IMAP setup

Once client connectivity works, most teams add these workflows:

- [Email Sandbox API](/product/email-sandbox/) to validate real inbox behavior in CI and staging.
- [Email client testing](/testing/email-client-testing/) for rendering and behavior checks across major clients.
- [DMARC monitoring](/email/dmarc-monitoring/) for sender-authentication drift and policy visibility.
- [Email webhooks](/guides/email-webhooks/) to route inbound events directly into automation systems.
