Self-hosted AI: send your emails with Llama, Qwen or Mistral without your data leaving

Self-hosted AI: send your emails with Llama, Qwen or Mistral without your data leaving

Many companies are reluctant to hand their customer files to an online assistant: questions, drafts and answers all go through the vendor's servers. The answer that's catching on is simple: run the AI in-house, with an open large language model.

There's one problem left: a model installed on your servers can't do anything but answer. To prepare and send your emails, it needs tools. That's what an MCP server provides; here is how to put it together with Mailpro.

The three pieces of the puzzle

PieceRoleExamples
The engineRuns the model on your hardwareOllama, LM Studio
The interfaceChats with the model and gives it toolsOpen WebUI, LibreChat, LM Studio
The tool serverGives access to your contacts, templates, campaigns, SMSThe Mailpro MCP server

Watch out for a common trap: Ollama runs the model but doesn't connect to MCP servers itself. You need an interface on top, such as Open WebUI or LibreChat, which handles the OAuth connection to Mailpro.

Which model should you choose?

To send emails, a model must be able to call tools (“function calling”): choose the right function and pass it the right parameters. A model that's too small ignores the tools or gets the arguments wrong.

  • Qwen (Alibaba): 119 languages and dialects, Apache 2.0 license for its recent dense models; ideal for multilingual campaigns.
  • Mistral and Mixtral: a European vendor, with several models under the Apache 2.0 license.
  • Llama (Meta): very widely used in internal assistants; Meta's community license, to read before any commercial use.
  • Gemma (Google): the smallest sizes run on an ordinary workstation.
  • DeepSeek: strong at reasoning; installed on your servers, it sends nothing to the vendor, unlike its online app.

A mid-sized model is a good start: big enough to chain reading, writing and sending, small enough for a single server.

What actually leaves your network

This is the question to ask your data protection officer, and the answer is clear:

  • Stays in-house: the model, your questions, your drafts, the AI's answers, your internal documents.
  • Leaves: only the calls to the Mailpro MCP server, over HTTPS, to your Mailpro account hosted in Switzerland. That's the same data you already manage in Mailpro.

Compared with an online assistant, where whatever the assistant reads also passes through the AI vendor, the exposure is reduced to the strict minimum.

The safeguards stay the same

A local model can make mistakes like any other. So Mailpro applies the same rules to every assistant: each send waits for your approval by default, or goes out directly within a daily cap you set; a log keeps track of everything and one click suspends all sends.

Setup, step by step

  1. Install the engine (Ollama or LM Studio) and a model that supports tool calling.
  2. Install the interface: in Open WebUI, the administrator adds the connection in the admin settings (Integrations, external tool servers), type MCP, OAuth authentication.
  3. Enter the server address, which you'll find in your Mailpro account on the AI Assistants (MCP) page; sign in to Mailpro and accept the permissions.
  4. In Mailpro, set how this assistant sends: with approval or direct, with a daily cap.

For Open WebUI, set a stable WEBUI_SECRET_KEY variable: otherwise OAuth connections are lost every time it restarts. The full guide: self-hosted AI and Mailpro.

You might also be interested in:

Within digital marketing, sending emails can be considered as one of the most important and direct communication channels with customers. It handles very personal information of the users so it must be watched with the utmost ca...
For many Marketing specialists it is almost a norm to say that email marketing campaigns should always be sent between Tuesday and Thursday in the morning hours. But, in some cases, even the least expected day can be successful. ...
How many times have we heard the phrase "The first impression is the one that counts"? When we think of Email Marketing, this phrase becomes very important. When it comes to the Subject of the Email, you could say it is...
What is an automatic email? An automated email is an email that is sent without having to manually input information every time you want to send a message . They are created and configured only once and are sent to contacts aut...
The success of a business, to a large extent, is determined by the marketing strategies. While most businesses focus on bringing more sales, only savvy marketers know that the best way to move ahead is to focus on a deeper aspect ...