mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-29 14:48:26 +00:00
frappe/frappe#478 erpnext install works
This commit is contained in:
@@ -10,12 +10,11 @@ from frappe import msgprint, throw, _
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Newsletter(Document):
|
||||
|
||||
def onload(self):
|
||||
if self.email_sent:
|
||||
self.set("__status_count", dict(frappe.db.sql("""select status, count(*))
|
||||
self.set("__status_count", dict(frappe.db.sql("""select status, count(*)
|
||||
from `tabBulk Email` where ref_doctype=%s and ref_docname=%s
|
||||
group by status""", (self.doctype, self.name))) or None
|
||||
group by status""", (self.doctype, self.name))) or None)
|
||||
|
||||
def test_send(self, doctype="Lead"):
|
||||
self.recipients = self.test_email_id.split(",")
|
||||
|
||||
@@ -7,6 +7,8 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils.email_lib.receive import POP3Mailbox
|
||||
import _socket, poplib
|
||||
|
||||
class SupportEmailSettings(Document):
|
||||
|
||||
@@ -14,10 +16,7 @@ class SupportEmailSettings(Document):
|
||||
"""
|
||||
Checks support ticket email settings
|
||||
"""
|
||||
if self.sync_support_mails and self.mail_server:
|
||||
from frappe.utils.email_lib.receive import POP3Mailbox
|
||||
import _socket, poplib
|
||||
|
||||
if self.sync_support_mails and self.mail_server:
|
||||
inc_email = frappe.get_doc('Incoming Email Settings')
|
||||
# inc_email.encode()
|
||||
inc_email.host = self.mail_server
|
||||
|
||||
Reference in New Issue
Block a user