Email COnfigs & setup
This commit is contained in:
@@ -0,0 +1,78 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div style="max-width: 800px; margin: 0 auto; padding: 20px;">
|
||||
<div style="background: white; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
|
||||
<h2 style="margin-top: 0; color: #1f2937;">Test Email: {{ template.display_name }}</h2>
|
||||
|
||||
<div style="background: #f8fafc; border-radius: 6px; padding: 16px; margin-bottom: 24px;">
|
||||
<p style="margin: 0 0 8px 0; color: #64748b; font-size: 14px;">
|
||||
<strong>Template Path:</strong> {{ template.template_path }}
|
||||
</p>
|
||||
<p style="margin: 0 0 8px 0; color: #64748b; font-size: 14px;">
|
||||
<strong>Type:</strong> {{ template.get_template_type_display }}
|
||||
</p>
|
||||
<p style="margin: 0; color: #64748b; font-size: 14px;">
|
||||
<strong>Description:</strong> {{ template.description|default:"No description" }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form method="post" action="{% url 'admin:system_emailtemplate_send_test' template.pk %}">
|
||||
{% csrf_token %}
|
||||
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label style="display: block; font-weight: 500; color: #374151; margin-bottom: 8px;">
|
||||
Send Test Email To:
|
||||
</label>
|
||||
<input type="email" name="to_email" value="{{ user.email }}"
|
||||
style="width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px;"
|
||||
placeholder="recipient@example.com" required>
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label style="display: block; font-weight: 500; color: #374151; margin-bottom: 8px;">
|
||||
Subject (Preview):
|
||||
</label>
|
||||
<input type="text" disabled value="[TEST] {{ template.default_subject }}"
|
||||
style="width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; background: #f9fafb; color: #6b7280;">
|
||||
</div>
|
||||
|
||||
<div style="margin-bottom: 20px;">
|
||||
<label style="display: block; font-weight: 500; color: #374151; margin-bottom: 8px;">
|
||||
Context Variables (JSON):
|
||||
</label>
|
||||
<textarea name="context" rows="8"
|
||||
style="width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; font-family: monospace;"
|
||||
placeholder='{"user_name": "Test User", "account_name": "Test Account"}'>{{ template.sample_context|default:"{}"|safe }}</textarea>
|
||||
<p style="color: #6b7280; font-size: 12px; margin-top: 4px;">
|
||||
Required variables: {{ template.required_context|default:"None specified"|safe }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div style="display: flex; gap: 12px;">
|
||||
<button type="submit"
|
||||
style="background: #6366f1; color: white; padding: 12px 24px; border: none;
|
||||
border-radius: 6px; font-weight: 500; cursor: pointer; font-size: 14px;">
|
||||
📧 Send Test Email
|
||||
</button>
|
||||
<a href="{% url 'admin:system_emailtemplate_changelist' %}"
|
||||
style="background: #e5e7eb; color: #374151; padding: 12px 24px;
|
||||
border-radius: 6px; font-weight: 500; text-decoration: none; font-size: 14px;">
|
||||
Cancel
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div style="background: #fef3c7; border-radius: 8px; padding: 16px; margin-top: 20px;">
|
||||
<h4 style="margin: 0 0 8px 0; color: #92400e;">⚠️ Testing Tips</h4>
|
||||
<ul style="margin: 0; padding-left: 20px; color: #78350f; font-size: 14px;">
|
||||
<li>Test emails are prefixed with [TEST] in the subject line</li>
|
||||
<li>Make sure your Resend API key is configured in Integration Providers</li>
|
||||
<li>Use sample_context to pre-fill test data for this template</li>
|
||||
<li>Check Email Logs after sending to verify delivery status</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}IGNY8{% endblock %}</title>
|
||||
<title>{% block title %}{{ company_name|default:"IGNY8" }}{% endblock %}</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
@@ -20,14 +20,18 @@
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
padding: 30px 0;
|
||||
background-color: #ffffff;
|
||||
border-bottom: 3px solid #6366f1;
|
||||
padding: 30px 20px;
|
||||
background-color: #0c1e35;
|
||||
border-radius: 12px 12px 0 0;
|
||||
}
|
||||
.logo {
|
||||
.header img {
|
||||
max-height: 40px;
|
||||
width: auto;
|
||||
}
|
||||
.header .logo-text {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #6366f1;
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
.content {
|
||||
@@ -36,76 +40,138 @@
|
||||
}
|
||||
.footer {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: #888888;
|
||||
padding: 24px 20px;
|
||||
background-color: #f8fafc;
|
||||
color: #64748b;
|
||||
font-size: 12px;
|
||||
border-radius: 0 0 12px 12px;
|
||||
}
|
||||
.footer a {
|
||||
color: #3b82f6;
|
||||
text-decoration: none;
|
||||
}
|
||||
.footer a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.button {
|
||||
display: inline-block;
|
||||
padding: 12px 30px;
|
||||
background-color: #6366f1;
|
||||
padding: 14px 32px;
|
||||
background-color: #3b82f6;
|
||||
color: #ffffff !important;
|
||||
text-decoration: none;
|
||||
border-radius: 6px;
|
||||
border-radius: 8px;
|
||||
font-weight: 600;
|
||||
margin: 20px 0;
|
||||
}
|
||||
.button:hover {
|
||||
background-color: #4f46e5;
|
||||
background-color: #2563eb;
|
||||
}
|
||||
.button-secondary {
|
||||
background-color: #64748b;
|
||||
}
|
||||
.button-secondary:hover {
|
||||
background-color: #475569;
|
||||
}
|
||||
.info-box {
|
||||
background-color: #f8fafc;
|
||||
border-left: 4px solid #6366f1;
|
||||
padding: 15px 20px;
|
||||
background-color: #eff6ff;
|
||||
border-left: 4px solid #3b82f6;
|
||||
padding: 16px 20px;
|
||||
margin: 20px 0;
|
||||
border-radius: 0 8px 8px 0;
|
||||
}
|
||||
.warning-box {
|
||||
background-color: #fef3c7;
|
||||
border-left: 4px solid #f59e0b;
|
||||
padding: 15px 20px;
|
||||
padding: 16px 20px;
|
||||
margin: 20px 0;
|
||||
border-radius: 0 8px 8px 0;
|
||||
}
|
||||
.success-box {
|
||||
background-color: #d1fae5;
|
||||
border-left: 4px solid #10b981;
|
||||
padding: 15px 20px;
|
||||
background-color: #dcfce7;
|
||||
border-left: 4px solid #22c55e;
|
||||
padding: 16px 20px;
|
||||
margin: 20px 0;
|
||||
border-radius: 0 8px 8px 0;
|
||||
}
|
||||
.error-box {
|
||||
background-color: #fee2e2;
|
||||
border-left: 4px solid #ef4444;
|
||||
padding: 16px 20px;
|
||||
margin: 20px 0;
|
||||
border-radius: 0 8px 8px 0;
|
||||
}
|
||||
h1, h2, h3 {
|
||||
color: #1f2937;
|
||||
color: #0f172a;
|
||||
margin-top: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 24px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 20px;
|
||||
}
|
||||
a {
|
||||
color: #6366f1;
|
||||
color: #3b82f6;
|
||||
}
|
||||
.details-table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 15px 0;
|
||||
margin: 20px 0;
|
||||
}
|
||||
.details-table td {
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
padding: 12px 0;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
.details-table td:first-child {
|
||||
color: #6b7280;
|
||||
color: #64748b;
|
||||
width: 40%;
|
||||
font-size: 14px;
|
||||
}
|
||||
.details-table td:last-child {
|
||||
font-weight: 500;
|
||||
color: #0f172a;
|
||||
}
|
||||
.divider {
|
||||
height: 1px;
|
||||
background-color: #e2e8f0;
|
||||
margin: 24px 0;
|
||||
}
|
||||
.text-muted {
|
||||
color: #64748b;
|
||||
font-size: 14px;
|
||||
}
|
||||
.text-small {
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<a href="{{ frontend_url }}" class="logo">IGNY8</a>
|
||||
<a href="{{ frontend_url }}">
|
||||
{% if logo_url %}
|
||||
<img src="{{ logo_url }}" alt="{{ company_name|default:'IGNY8' }}" />
|
||||
{% else %}
|
||||
<span class="logo-text">{{ company_name|default:"IGNY8" }}</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>© {{ current_year|default:"2026" }} IGNY8. All rights reserved.</p>
|
||||
<p>
|
||||
<a href="{{ frontend_url }}/privacy">Privacy Policy</a> |
|
||||
<a href="{{ frontend_url }}/terms">Terms of Service</a>
|
||||
{% if company_address %}
|
||||
<p style="margin-bottom: 12px;">{{ company_address }}</p>
|
||||
{% endif %}
|
||||
<p style="margin-bottom: 8px;">
|
||||
<a href="{{ frontend_url }}/privacy">Privacy Policy</a> |
|
||||
<a href="{{ frontend_url }}/terms">Terms of Service</a>{% if unsubscribe_url %} |
|
||||
<a href="{{ unsubscribe_url }}">Email Preferences</a>{% endif %}
|
||||
</p>
|
||||
<p style="color: #94a3b8; margin-top: 16px;">
|
||||
© {{ current_year|default:"2026" }} {{ company_name|default:"IGNY8" }}. All rights reserved.
|
||||
</p>
|
||||
{% if recipient_email %}<p style="color: #94a3b8; font-size: 11px; margin-top: 8px;">This email was sent to {{ recipient_email }}</p>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -28,6 +28,6 @@
|
||||
|
||||
<p>
|
||||
Best regards,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -34,6 +34,6 @@
|
||||
|
||||
<p>
|
||||
Best regards,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -26,6 +26,6 @@
|
||||
|
||||
<p>
|
||||
Best regards,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Thank you for choosing IGNY8!<br>
|
||||
The IGNY8 Team
|
||||
Thank you for choosing {{ company_name|default:"IGNY8" }}!<br>
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -40,6 +40,6 @@
|
||||
|
||||
<p>
|
||||
Thank you for your patience,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
<a href="{{ billing_url }}" class="button">Update Payment Method</a>
|
||||
</p>
|
||||
|
||||
<p>If you need assistance, please contact our support team by replying to this email.</p>
|
||||
<p>If you need assistance, please contact our support team{% if support_url %} at <a href="{{ support_url }}">{{ support_url }}</a> or{% endif %} by replying to this email.</p>
|
||||
|
||||
<p>
|
||||
Best regards,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
<a href="{{ billing_url }}" class="button">Retry Payment</a>
|
||||
</p>
|
||||
|
||||
<p>If you believe this is an error or have questions, please contact our support team by replying to this email.</p>
|
||||
<p>If you believe this is an error or have questions, please contact our support team{% if support_url %} at <a href="{{ support_url }}">{{ support_url }}</a> or{% endif %} by replying to this email.</p>
|
||||
|
||||
<p>
|
||||
Best regards,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
|
||||
<p>The refund will appear in your original payment method within 5-10 business days, depending on your bank or card issuer.</p>
|
||||
|
||||
<p>If you have any questions about this refund, please contact our support team by replying to this email.</p>
|
||||
<p>If you have any questions about this refund, please contact our support team{% if support_url %} at <a href="{{ support_url }}">{{ support_url }}</a> or{% endif %} by replying to this email.</p>
|
||||
|
||||
<p>
|
||||
Best regards,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p>You now have full access to all features included in your plan. Start exploring what IGNY8 can do for you!</p>
|
||||
<p>You now have full access to all features included in your plan. Start exploring what {{ company_name|default:"IGNY8" }} can do for you!</p>
|
||||
|
||||
<p style="text-align: center;">
|
||||
<a href="{{ dashboard_url }}" class="button">Go to Dashboard</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Thank you for choosing IGNY8!<br>
|
||||
The IGNY8 Team
|
||||
Thank you for choosing {{ company_name|default:"IGNY8" }}!<br>
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -36,6 +36,6 @@
|
||||
|
||||
<p>
|
||||
Best regards,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% extends "emails/base.html" %}
|
||||
{% block title %}Welcome to IGNY8{% endblock %}
|
||||
{% block title %}Welcome to {{ company_name|default:"IGNY8" }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Welcome to IGNY8!</h1>
|
||||
<h1>Welcome to {{ company_name|default:"IGNY8" }}!</h1>
|
||||
|
||||
<p>Hi {{ user_name }},</p>
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
<a href="{{ login_url }}" class="button">Go to Dashboard</a>
|
||||
</p>
|
||||
|
||||
<p>If you have any questions, our support team is here to help. Just reply to this email or visit our help center.</p>
|
||||
<p>If you have any questions, our support team is here to help. {% if support_url %}<a href="{{ support_url }}">Visit our help center</a> or {% endif %}reply to this email.</p>
|
||||
|
||||
<p>
|
||||
Best regards,<br>
|
||||
The IGNY8 Team
|
||||
The {{ company_name|default:"IGNY8" }} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user