Fixed a problem in email sending when attach/embed flag was removed.
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"htmlTemplate": "statement.pdf.jinja",
|
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"monthly_payment": 589.0,
|
"monthly_payment": 589.0,
|
||||||
"interest_rate": 6.5,
|
"interest_rate": 6.5,
|
||||||
@@ -12,8 +11,6 @@
|
|||||||
"periods_per_year": 12,
|
"periods_per_year": 12,
|
||||||
"periods": 18
|
"periods": 18
|
||||||
},
|
},
|
||||||
"format": "html",
|
|
||||||
"txtTemplate": "statement.txt.jinja",
|
|
||||||
"lender": {
|
"lender": {
|
||||||
"city": "Washington",
|
"city": "Washington",
|
||||||
"name": "Test Lender",
|
"name": "Test Lender",
|
||||||
@@ -100,15 +97,11 @@
|
|||||||
"address": "301 N Beauregard St Apt 203"
|
"address": "301 N Beauregard St Apt 203"
|
||||||
},
|
},
|
||||||
"email": {
|
"email": {
|
||||||
"body": "Your test loan statement is attached.",
|
|
||||||
"to_address": "jkent3rd@gmail.com",
|
"to_address": "jkent3rd@gmail.com",
|
||||||
"from_address": "jkent3rd@gmail.com",
|
"from_address": "jkent3rd@gmail.com",
|
||||||
"text": "Please see your most recent test account statement.",
|
"subject": "Your test loan statement...",
|
||||||
|
"body": "Your test loan statement is attached.",
|
||||||
"server": "smtp.gmail.com",
|
"server": "smtp.gmail.com",
|
||||||
"send_text": "true",
|
"password": "pvyrbcnzrjoizprn"
|
||||||
"template": "./template.txt",
|
|
||||||
"send_pdf": "true",
|
|
||||||
"password": "pvyrbcnzrjoizprn",
|
|
||||||
"subject": "Your test loan statement..."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
3
web.py
3
web.py
@@ -104,7 +104,6 @@ def send_statement():
|
|||||||
loanFile = request.form["loan"]
|
loanFile = request.form["loan"]
|
||||||
subject = request.form["subject"]
|
subject = request.form["subject"]
|
||||||
message = request.form["message"]
|
message = request.form["message"]
|
||||||
style = request.form["style"]
|
|
||||||
|
|
||||||
loan = loadLoanInformation(getFullPathofLoanFile(loanFile))
|
loan = loadLoanInformation(getFullPathofLoanFile(loanFile))
|
||||||
amortizeLoan(loan)
|
amortizeLoan(loan)
|
||||||
@@ -119,8 +118,6 @@ def send_statement():
|
|||||||
if 'pdf' in request.form:
|
if 'pdf' in request.form:
|
||||||
pdfInterimReport = transformTemplate(selectTemplate('pdf'), loan)
|
pdfInterimReport = transformTemplate(selectTemplate('pdf'), loan)
|
||||||
pdfReport = createPDF(pdfInterimReport)
|
pdfReport = createPDF(pdfInterimReport)
|
||||||
if style == 'embed':
|
|
||||||
style = 'attach'
|
|
||||||
reportCreated = True
|
reportCreated = True
|
||||||
|
|
||||||
if ('html' in request.form) or (reportCreated is False):
|
if ('html' in request.form) or (reportCreated is False):
|
||||||
|
|||||||
Reference in New Issue
Block a user