Enter your SMTP credentials below to connect and manage your email server. Your credentials are never stored on our servers — 100% private.
Fill in your server configuration below to establish a connection.
Follow these steps to connect any SMTP server and start sending emails in minutes.
domain.com or sub.domain.com)smtp.gmail.com)587 or 465)Defines the email subject line shown to the recipient.
Recipient email. If empty, emails go to the SMTP username.
Plain text version of the email. Used when no HTML is provided.
HTML formatted content. Falls back to text if left empty.
Any extra input (name, phone, company) is auto-included in the email.
<form data-mailtree="true">
<input type="text" name="name" placeholder="Full Name" required>
<input type="email" name="email" placeholder="Email" required>
<input type="text" name="phone" placeholder="Phone (optional)">
<input type="text" name="subject" placeholder="Subject (optional)">
<input type="text" name="company" placeholder="Company (optional)">
<textarea name="message" placeholder="Message" required></textarea>
<button type="submit">Send</button>
</form>
<script src="https://mailtree.vercel.app/mailtree.js"></script>
document.getElementById("contactForm")
.addEventListener("submit", async (e) => {
e.preventDefault();
const formData = new FormData(e.target);
const data = {};
formData.forEach((value, key) => {
data[key] = value;
});
const res = await fetch(
"https://mailtree.vercel.app/send",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(data)
}
);
const result = await res.json();
alert(result.message || "Email sent successfully!");
});
Note: The form supports dynamic fields. Any input with a
name attribute will be sent automatically to the Mailtree API endpoint.