ver 11 fixed spark send
This commit is contained in:
parent
0702dcda68
commit
9c365aa4e1
Binary file not shown.
@ -165,15 +165,16 @@ MEDIA_ROOT = BASE_DIR / 'media'
|
||||
# Email
|
||||
EMAIL_BACKEND = os.getenv(
|
||||
"EMAIL_BACKEND",
|
||||
"django.core.mail.backends.console.EmailBackend"
|
||||
"django.core.mail.backends.smtp.EmailBackend"
|
||||
)
|
||||
EMAIL_HOST = os.getenv("EMAIL_HOST", "127.0.0.1")
|
||||
EMAIL_HOST = os.getenv("EMAIL_HOST", "smtp.gmail.com")
|
||||
EMAIL_PORT = int(os.getenv("EMAIL_PORT", "587"))
|
||||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER", "")
|
||||
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD", "")
|
||||
EMAIL_HOST_USER = os.getenv("EMAIL_HOST_USER", "konrad@foxfitt.co.za")
|
||||
EMAIL_HOST_PASSWORD = os.getenv("EMAIL_HOST_PASSWORD", "cwvhpcwyijneukax")
|
||||
EMAIL_USE_TLS = os.getenv("EMAIL_USE_TLS", "true").lower() == "true"
|
||||
EMAIL_USE_SSL = os.getenv("EMAIL_USE_SSL", "false").lower() == "true"
|
||||
DEFAULT_FROM_EMAIL = os.getenv("DEFAULT_FROM_EMAIL", "no-reply@example.com")
|
||||
DEFAULT_FROM_EMAIL = os.getenv("DEFAULT_FROM_EMAIL", "konrad+foxlog@foxfitt.co.za")
|
||||
SPARK_RECEIPT_EMAIL = os.getenv("SPARK_RECEIPT_EMAIL", "foxfitt-ed9wc+expense@to.sparkreceipt.com")
|
||||
CONTACT_EMAIL_TO = [
|
||||
item.strip()
|
||||
for item in os.getenv("CONTACT_EMAIL_TO", DEFAULT_FROM_EMAIL).split(",")
|
||||
@ -191,4 +192,4 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
# Authentication
|
||||
LOGIN_URL = 'login'
|
||||
LOGIN_REDIRECT_URL = 'home'
|
||||
LOGOUT_REDIRECT_URL = 'login'
|
||||
LOGOUT_REDIRECT_URL = 'login'
|
||||
Binary file not shown.
@ -607,7 +607,7 @@ def process_payment(request, worker_id):
|
||||
# 2. Render PDF Attachment
|
||||
pdf_content = render_to_pdf('core/pdf/payslip_pdf.html', context)
|
||||
|
||||
recipient_list = ['foxfitt-ed9wc+expense@to.sparkreceipt.com']
|
||||
recipient_list = [settings.SPARK_RECEIPT_EMAIL]
|
||||
|
||||
try:
|
||||
# Construct Email with Attachment
|
||||
@ -790,7 +790,7 @@ def create_receipt(request):
|
||||
|
||||
# Email Generation
|
||||
subject = f"Receipt from {receipt.vendor} - {receipt.date}"
|
||||
recipient_list = ['foxfitt-ed9wc+expense@to.sparkreceipt.com']
|
||||
recipient_list = [settings.SPARK_RECEIPT_EMAIL]
|
||||
|
||||
# Prepare Context
|
||||
context = {
|
||||
@ -831,4 +831,4 @@ def create_receipt(request):
|
||||
return render(request, 'core/create_receipt.html', {
|
||||
'form': form,
|
||||
'items': items
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user