Version 6.6.5 Source

Table Name: tabEmail Account

Fields

Sr Fieldname Type Label Options
1 email_settings Section Break
2 service Select Service
GMail
Yahoo Mail
Outlook.com
3 email_id Data Email Id
Email
4 login_id_is_different Check Login Id is Different
5 login_id Data Login Id
6 password Password Password
7 email_account_name Data Email Account Name

e.g. "Support", "Sales", "Jerry Yang"

8 mailbox_settings Section Break
9 enable_incoming Check Enable Incoming

Check this to pull emails from your mailbox

10 pop3_server Data POP3 Server

e.g. pop.gmail.com

11 use_ssl Check Use SSL
12 attachment_limit Int Attachment Limit (MB)

Ignore attachments over this size

13 append_to Link Append To

Append as communication against this DocType (must have fields, "Status", "Subject")

DocType
14 default_incoming Check Default Incoming

e.g. replies@yourcomany.com. All replies will come to this inbox.

15 section_break_13 Section Break
16 notify_if_unreplied Check Notify if unreplied
17 unreplied_for_mins Int Notify if unreplied for (in mins)
18 send_notification_to Small Text Send Notification to

Email Ids

19 outgoing_mail_settings Section Break
20 enable_outgoing Check Enable Outgoing

SMTP Settings for outgoing emails

21 smtp_server Data SMTP Server

e.g. smtp.gmail.com

22 use_tls Check Use TLS
23 smtp_port Data Port

If non standard port (e.g. 587)

24 default_outgoing Check Default Outgoing

Notifications and bulk mails will be sent from this outgoing server.

25 always_use_account_email_id_as_sender Check Always use Account's Email ID as Sender

Uses the Email ID mentioned in this Account as the Sender for all emails sent using this Account.

26 signature_section Section Break
27 add_signature Check Add Signature
28 signature Text Editor Signature
29 auto_reply Section Break
30 enable_auto_reply Check Enable Auto Reply
31 auto_reply_message Text Editor Auto Reply Message

ProTip: Add Reference: {{ reference_doctype }} {{ reference_name }} to send document reference

32 set_footer Section Break
33 footer Text Editor Footer

Controller

frappe.email.doctype.email_account.email_account

Class EmailAccount

Inherits from frappe.model.document.Document

autoname (self)

Set name as email_account_name or make title from email id.


check_smtp (self)

Checks SMTP settings.


get_pop3 (self)

Returns logged in POP3 connection object.


get_unreplied_notification_emails (self)

Return list of emails listed


insert_communication (self, raw)

No docs


on_trash (self)

Clear communications where email account is linked


on_update (self)

Check there is only one default of each type.


receive (self, test_mails=None)

Called by scheduler to receive emails from this EMail account using POP3.


send_auto_reply (self, communication, email)

Send auto reply if set.


set_thread (self, communication, email)

Appends communication to parent based on thread ID. Will extract parent communication and will link the communication to the reference of that communication. Also set the status of parent transaction to Open or Replied.

If no thread id is found and append_to is set for the email account, it will create a new parent transaction (e.g. Issue)


there_must_be_only_one_default (self)

If current Email Account is default, un-default all other accounts.


validate (self)

Validate email id and check POP3 and SMTP connections is enabled.



Class SentEmailInInbox

Inherits from exceptions.Exception


Public API
/api/method/frappe.email.doctype.email_account.email_account.get_append_to

frappe.email.doctype.email_account.email_account.get_append_to (doctype=None, txt=None, searchfield=None, start=None, page_len=None, filters=None)

No docs


frappe.email.doctype.email_account.email_account.notify_unreplied ()

Sends email notifications if there are unreplied Communications and notify_if_unreplied is set as true.


frappe.email.doctype.email_account.email_account.pull (now=False)

Will be called via scheduler, pull emails from all enabled POP3 email accounts.


Linked In: