Hubfly spaceDocs
Console

SMTP submission

Use an SMTP credential created in your Mail project. REST keys and Dashboard sessions cannot log in to SMTP. The credential’s allowed sender addresses are checked by Mail when the message is submitted.

Connection settings

SettingValue
Hostmail.hubmail.space
Port587
Transport securityConnect, issue STARTTLS, then authenticate. TLS is required before AUTH.
AuthenticationSMTP AUTH PLAIN with the username and password shown once when the SMTP credential is created or rotated.
EnvelopeUse MAIL FROM from an authorized alias and one or more RCPT TO recipients.

The message’s visible From must match the authorized envelope sender. Mail refuses unauthenticated relay and plaintext authentication before STARTTLS.

Python example

send.py
import os
import smtplib
import ssl
from email.message import EmailMessage
from email.utils import formatdate, make_msgid

sender = "hello@free.hubmail.space"
recipient = "customer@example.net"
message = EmailMessage()
message["From"] = sender
message["To"] = recipient
message["Subject"] = "Your Hubfly space Mail test"
message["Date"] = formatdate(localtime=True)
message["Message-ID"] = make_msgid()
message.set_content("Hello from Hubfly space Mail.")

with smtplib.SMTP("mail.hubmail.space", 587, timeout=30) as smtp:
    smtp.starttls(context=ssl.create_default_context())
    smtp.login(os.environ["HUBFLY_SMTP_USER"], os.environ["HUBFLY_SMTP_PASSWORD"])
    smtp.send_message(message, from_addr=sender, to_addrs=[recipient])

Store the login and password in server-side environment secrets. Your library should require TLS certificate validation. Use its MIME builder for HTML and attachments rather than writing raw boundaries yourself.

Sender scope and limits

Create a separate SMTP credential for each application and allow only its sender addresses. For an owned custom domain, all-address scope is an explicit choice. Shared free-domain credentials can use only the owner’s exact aliases. Mail applies the same free allowance across direct SMTP, direct REST, and Dashboard sends: 20 recipients/hour and 100 recipients/day per owning account.

SMTP submissions use Mail’s configured maximum message size (25 MiB by default). Attachment encoding increases the MIME size, so leave headroom. This direct limit is separate from the Dashboard composer’s 5 MB total attachment limit.

Failures and status

  • STARTTLS or login failure: verify host, port, TLS mode, credential kind, and the current secret after rotation.
  • Sender rejected: check that both envelope and visible From are allowed by the login and that the domain is active.
  • Rate or size rejection: reduce recipients or message size, or wait for the allowance window.
  • Accepted submission: Mail queues the message; acceptance by the local Postfix queue is not final delivery to the recipient.

Where to see SMTP activity

Open the Mail project’s Activity page. It includes sends made with SMTP credentials as well as Dashboard and REST sends.
Something unclear or out of date? Emailsupport@hubfly.spaceBack to top