server steering implementation
This commit is contained in:
@@ -166,4 +166,42 @@ def send_password_reset_token(email: str, token: str) -> bool:
|
||||
</div>
|
||||
"""
|
||||
|
||||
return send(email, subject, text_body=text_note, html_body=html_note)
|
||||
return send(email, subject, text_body=text_note, html_body=html_note)
|
||||
|
||||
def send_accreditation_email(recipient: str, domain: str, username: str, password: str, invoice_pdf_path: str, contract_pdf_path: str) -> bool:
|
||||
"""Sends an accreditation email with login credentials and attached documents."""
|
||||
|
||||
subject = "Ihre Zugangsdaten und Unterlagen für Invario"
|
||||
|
||||
text_note = (
|
||||
f"Sehr geehrte/r {username},\n\n"
|
||||
"Vielen Dank für Ihre Akkreditierung bei Invario. "
|
||||
"Im Anhang finden Sie Ihre Rechnung und den Vertrag.\n\n"
|
||||
f"Ihre Zugangsdaten:\n"
|
||||
f"Domain: {domain}\n"
|
||||
f"Benutzername: {username}\n"
|
||||
f"Passwort: {password}\n\n"
|
||||
"Bitte bewahren Sie diese Informationen sicher auf."
|
||||
)
|
||||
|
||||
html_note = f"""
|
||||
<div style="font-family: Arial, Helvetica, sans-serif; color: #333333;">
|
||||
<h2 style="color: #2c3e50; margin-top: 0;">Willkommen bei Invario!</h2>
|
||||
<p style="font-size: 15px; line-height: 1.6;">
|
||||
Vielen Dank für Ihre Akkreditierung. Im Anhang finden Sie Ihre Rechnung und den Vertrag.
|
||||
</p>
|
||||
|
||||
<h3 style="color: #2c3e50;">Ihre Zugangsdaten:</h3>
|
||||
<ul style="font-size: 15px; line-height: 1.6;">
|
||||
<li><strong>Domain:</strong> {domain}</li>
|
||||
<li><strong>Benutzername:</strong> {username}</li>
|
||||
<li><strong>Passwort:</strong> {password}</li>
|
||||
</ul>
|
||||
|
||||
<p style="font-size: 13px; color: #64748b; line-height: 1.5;">
|
||||
Bitte bewahren Sie diese Informationen sicher auf.
|
||||
</p>
|
||||
</div>
|
||||
"""
|
||||
|
||||
return send(recipient, subject, text_body=text_note, html_body=html_note)
|
||||
Reference in New Issue
Block a user