feat: MIME email composer with .ovpn attachment via msmtp/sendmail

Add send_email() function that composes multipart MIME messages with
template-based body and .ovpn file attachment, piped to mail binary via
subprocess.Popen. Supports Cryptgeon URL insertion and sender metadata.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad Doloman
2026-06-23 23:58:00 +03:00
parent 5b9ee8d448
commit a2593b644e
3 changed files with 102 additions and 0 deletions

11
email_template.txt Normal file
View File

@@ -0,0 +1,11 @@
Hello,
Your OpenVPN configuration has been updated for: {cn}
Retrieve your one-time password here (link expires after one view):
{url}
Your configuration file is attached as '{config_name}'.
Regards,
VPN Admin