Integrations
A

Send ASP.NET mail through SecureSMTP

Use System.Net.Mail SmtpClient with our SMTP settings, or HttpClient for the API. No NuGet package needed.

Code setupLiveBackend

Setup

Send from your server with SMTP or one HTTPS request. There is no SDK to install.

  1. 1

    Create a SecureSMTP account

    Sign up at securessmtp.com/signup. The Free plan includes 5,000 emails a month. No card needed.

  2. 2

    Add a site and copy its API key

    Dashboard → Sites → + Add website. The last step shows the site’s API key (it starts with qcs_live_). It is shown only once, so copy it. The API keys page (/app/forms/api-keys) also shows the SMTP settings. Store the key in an environment variable (for example SECURESMTP_API_KEY). Never commit it or send it to the browser.

  3. 3

    What to install

    Nothing to install — use System.Net.Mail.SmtpClient pointed at smtp.securessmtp.com, or HttpClient for the API.

  4. 4

    Make your first send

    Copy the snippet below into a server-side endpoint or background job. Replace to, subject and the body with your own values.

  5. 5

    Test it

    Trigger your endpoint once. With the API, check that the response has ok: true. The email shows up in the Email log in your dashboard.

ASP.NET minimal APIFull API docs →
// Program.cs
using System.Net.Mail;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapPost("/api/contact", async (Contact data) => {
    using var smtp = new SmtpClient("smtp.securessmtp.com", 587);
    smtp.Credentials = new System.Net.NetworkCredential(
        "securessmtp",
        Environment.GetEnvironmentVariable("SECURESMTP_API_KEY"));
    smtp.EnableSsl = true;
    var msg = new MailMessage("[email protected]", "[email protected]",
                              "Contact", data.Message);
    await smtp.SendMailAsync(msg);
    return Results.Ok();
});

record Contact(string Message);

What you get

DKIM-signed email

Every email is signed with DKIM. With a verified sending domain it is signed as your domain, so DMARC passes for your domain.

Spam check before sending

Each email goes through a content check and an AI spam check before it leaves, so junk form posts do not go out under your name.

Email log and events

Every email is in the dashboard Email log with its status. Delivered, bounced, opened and clicked events can be posted to your server by webhook.

Retries on temporary errors

If the receiving server asks us to try again later, we keep trying and send an email.delayed event.

FAQ

How long does setup take?

A few minutes: add a site, put the key in an environment variable and add the snippet.

Which From address will people see?

New accounts send from their own verified sending domain, so mail goes out from the address you set for that domain. Any plan, including Free, can add one. Until it is verified you can send test emails to yourself. Older accounts can keep using [email protected] for a limited time, with your sender name, and the original From address becomes the Reply-To.

What happens if SecureSMTP cannot be reached?

The API call or SMTP login fails and the platform or automation tool shows the error; most automation tools can retry a failed step. Once we accept an email, we keep retrying if the receiving server asks us to try again later.

Can I send from my own domain?

Yes, and new accounts need to. Any plan can add a sending domain (Free includes 1). Add it in the dashboard and publish one DKIM TXT record (the advanced setup adds two more records). Emails sent from a verified domain do not count toward the monthly limit.