Improve email test: prominent card, HTML email, 'An mich' button
- Move test email form to a standalone card at the top of the page (was buried at the bottom of SMTP settings) - Add 'An mich' button that fills in the logged-in user's email - Send HTML + plain text test email (multi-alternative) styled like actual Stiftung emails, instead of plain text only - Include diagnostic info (SMTP server, sender, user) in test email Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,46 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Test-E-Mail senden (prominent) -->
|
||||
<div class="card mb-4 border-primary">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h3 class="card-title mb-0">
|
||||
<i class="fas fa-paper-plane me-1"></i>
|
||||
Test-E-Mail senden
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="text-muted small mb-3">
|
||||
Sendet eine echte Test-E-Mail (HTML + Text) an die angegebene Adresse, um den vollständigen Versandweg zu prüfen.
|
||||
</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="input-group">
|
||||
<input type="email"
|
||||
class="form-control"
|
||||
id="test_email_top"
|
||||
name="test_email"
|
||||
placeholder="empfaenger@example.de"
|
||||
value="{{ request.POST.test_email|default:'' }}"
|
||||
required>
|
||||
<button type="submit" name="action" value="test_smtp_send" class="btn btn-primary">
|
||||
<i class="fas fa-paper-plane me-1"></i> Senden
|
||||
</button>
|
||||
{% if request.user.email %}
|
||||
<button type="button" class="btn btn-outline-secondary" onclick="document.getElementById('test_email_top').value='{{ request.user.email }}'" title="Eigene E-Mail-Adresse einfügen">
|
||||
<i class="fas fa-user me-1"></i> An mich
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if request.user.email %}
|
||||
<div class="form-text">Ihre Adresse: <code>{{ request.user.email }}</code></div>
|
||||
{% else %}
|
||||
<div class="form-text text-warning"><i class="fas fa-exclamation-triangle me-1"></i>Kein E-Mail in Ihrem Benutzerprofil hinterlegt. Bitte Adresse manuell eingeben.</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- IMAP Section -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
@@ -178,24 +218,6 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="mb-3">
|
||||
<label for="test_email" class="form-label">
|
||||
<strong>Test-E-Mail senden</strong>
|
||||
</label>
|
||||
<div class="form-text mb-1">Sendet eine echte Test-E-Mail an die angegebene Adresse, um den vollständigen Versandweg zu prüfen.</div>
|
||||
<div class="input-group">
|
||||
<input type="email"
|
||||
class="form-control"
|
||||
id="test_email"
|
||||
name="test_email"
|
||||
placeholder="empfaenger@example.de"
|
||||
value="{{ request.POST.test_email|default:'' }}">
|
||||
<button type="submit" name="action" value="test_smtp_send" class="btn btn-outline-success">
|
||||
<i class="fas fa-paper-plane me-1"></i> Test senden
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user