Table Name: tabEmail Account
Sr | Fieldname | Type | Label | Options |
---|---|---|---|---|
1 | email_settings |
Section Break | ||
2 | service |
Select | Service |
GMail Yahoo Mail Outlook.com Yandex.Mail |
3 | email_id |
Data | Email Id |
|
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 | use_imap |
Check | Use IMAP | |
11 | email_server |
Data |
Email Server
e.g. pop.gmail.com / imap.gmail.com |
|
12 | use_ssl |
Check | Use SSL | |
13 | attachment_limit |
Int |
Attachment Limit (MB)
Ignore attachments over this size |
|
14 | append_to |
Link |
Append To
Append as communication against this DocType (must have fields, "Status", "Subject") |
DocType |
15 | default_incoming |
Check |
Default Incoming
e.g. replies@yourcomany.com. All replies will come to this inbox. |
|
16 | section_break_13 |
Section Break | ||
17 | notify_if_unreplied |
Check | Notify if unreplied | |
18 | unreplied_for_mins |
Int | Notify if unreplied for (in mins) | |
19 | send_notification_to |
Small Text |
Send Notification to
Email Ids |
|
20 | outgoing_mail_settings |
Section Break | ||
21 | enable_outgoing |
Check |
Enable Outgoing
SMTP Settings for outgoing emails |
|
22 | smtp_server |
Data |
SMTP Server
e.g. smtp.gmail.com |
|
23 | use_tls |
Check | Use TLS | |
24 | smtp_port |
Data |
Port
If non standard port (e.g. 587) |
|
25 | default_outgoing |
Check |
Default Outgoing
Notifications and bulk mails will be sent from this outgoing server. |
|
26 | 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. |
|
27 | signature_section |
Section Break | ||
28 | add_signature |
Check | Add Signature | |
29 | signature |
Text Editor | Signature | |
30 | auto_reply |
Section Break | ||
31 | enable_auto_reply |
Check | Enable Auto Reply | |
32 | auto_reply_message |
Text Editor |
Auto Reply Message
ProTip: Add |
|
33 | set_footer |
Section Break | ||
34 | footer |
Text Editor | Footer |
Inherits from frappe.model.document.Document
Set name as email_account_name
or make title from email id.
Checks SMTP settings.
get_server (self, in_receive=False)
Returns logged in POP3 connection object.
get_unreplied_notification_emails (self)
Return list of emails listed
handle_incoming_connect_error (self, description)
No docs
insert_communication (self, raw)
No docs
Clear communications where email account is linked
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/IMAP.
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 email id and check POP3/IMAP and SMTP connections is enabled.
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 Email accounts.