751 lines
No EOL
18 KiB
HTML
751 lines
No EOL
18 KiB
HTML
<!-- title: Email Account -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="dev-header">
|
|
|
|
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
|
Version 6.6.5</a>
|
|
|
|
|
|
<a class="btn btn-default btn-sm" href="https://github.com/frappe/frappe/tree/develop/frappe/email/doctype/email_account"
|
|
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p><b>Table Name:</b> <code>tabEmail Account</code></p>
|
|
|
|
|
|
|
|
|
|
<h3>Fields</h3>
|
|
|
|
<table class="table table-bordered" style="table-layout: fixed;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%">Sr</th>
|
|
<th style="width: 25%">Fieldname</th>
|
|
<th style="width: 20%">Type</th>
|
|
<th style="width: 25%">Label</th>
|
|
<th style="width: 25%">Options</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr class="info">
|
|
<td>1</td>
|
|
<td ><code>email_settings</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>2</td>
|
|
<td ><code>service</code></td>
|
|
<td >
|
|
Select</td>
|
|
<td >
|
|
Service
|
|
|
|
</td>
|
|
<td>
|
|
<pre>
|
|
GMail
|
|
Yahoo Mail
|
|
Outlook.com</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>3</td>
|
|
<td class="danger" title="Mandatory"><code>email_id</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Email Id
|
|
|
|
</td>
|
|
<td>
|
|
<pre>Email</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>4</td>
|
|
<td ><code>login_id_is_different</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Login Id is Different
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>5</td>
|
|
<td ><code>login_id</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Login Id
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>6</td>
|
|
<td ><code>password</code></td>
|
|
<td >
|
|
Password</td>
|
|
<td >
|
|
Password
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>7</td>
|
|
<td ><code>email_account_name</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Email Account Name
|
|
<p class="text-muted small">
|
|
e.g. "Support", "Sales", "Jerry Yang"</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>8</td>
|
|
<td ><code>mailbox_settings</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>9</td>
|
|
<td ><code>enable_incoming</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Enable Incoming
|
|
<p class="text-muted small">
|
|
Check this to pull emails from your mailbox</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>10</td>
|
|
<td ><code>pop3_server</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
POP3 Server
|
|
<p class="text-muted small">
|
|
e.g. pop.gmail.com</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>11</td>
|
|
<td ><code>use_ssl</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Use SSL
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>12</td>
|
|
<td ><code>attachment_limit</code></td>
|
|
<td >
|
|
Int</td>
|
|
<td >
|
|
Attachment Limit (MB)
|
|
<p class="text-muted small">
|
|
Ignore attachments over this size</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>13</td>
|
|
<td ><code>append_to</code></td>
|
|
<td >
|
|
Link</td>
|
|
<td >
|
|
Append To
|
|
<p class="text-muted small">
|
|
Append as communication against this DocType (must have fields, "Status", "Subject")</p>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<a href="https://frappe.github.io/frappe/current/models/core/doctype">DocType</a>
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>14</td>
|
|
<td ><code>default_incoming</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Default Incoming
|
|
<p class="text-muted small">
|
|
e.g. replies@yourcomany.com. All replies will come to this inbox.</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>15</td>
|
|
<td ><code>section_break_13</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>16</td>
|
|
<td ><code>notify_if_unreplied</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Notify if unreplied
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>17</td>
|
|
<td ><code>unreplied_for_mins</code></td>
|
|
<td >
|
|
Int</td>
|
|
<td >
|
|
Notify if unreplied for (in mins)
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>18</td>
|
|
<td ><code>send_notification_to</code></td>
|
|
<td >
|
|
Small Text</td>
|
|
<td >
|
|
Send Notification to
|
|
<p class="text-muted small">
|
|
Email Ids</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>19</td>
|
|
<td ><code>outgoing_mail_settings</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>20</td>
|
|
<td ><code>enable_outgoing</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Enable Outgoing
|
|
<p class="text-muted small">
|
|
SMTP Settings for outgoing emails</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>21</td>
|
|
<td ><code>smtp_server</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
SMTP Server
|
|
<p class="text-muted small">
|
|
e.g. smtp.gmail.com</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>22</td>
|
|
<td ><code>use_tls</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Use TLS
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>23</td>
|
|
<td ><code>smtp_port</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Port
|
|
<p class="text-muted small">
|
|
If non standard port (e.g. 587)</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>24</td>
|
|
<td ><code>default_outgoing</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Default Outgoing
|
|
<p class="text-muted small">
|
|
Notifications and bulk mails will be sent from this outgoing server.</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>25</td>
|
|
<td ><code>always_use_account_email_id_as_sender</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Always use Account's Email ID as Sender
|
|
<p class="text-muted small">
|
|
Uses the Email ID mentioned in this Account as the Sender for all emails sent using this Account. </p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>26</td>
|
|
<td ><code>signature_section</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>27</td>
|
|
<td ><code>add_signature</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Add Signature
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>28</td>
|
|
<td ><code>signature</code></td>
|
|
<td >
|
|
Text Editor</td>
|
|
<td >
|
|
Signature
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>29</td>
|
|
<td ><code>auto_reply</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>30</td>
|
|
<td ><code>enable_auto_reply</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Enable Auto Reply
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>31</td>
|
|
<td ><code>auto_reply_message</code></td>
|
|
<td >
|
|
Text Editor</td>
|
|
<td >
|
|
Auto Reply Message
|
|
<p class="text-muted small">
|
|
ProTip: Add <code>Reference: {{ reference_doctype }} {{ reference_name }}</code> to send document reference</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>32</td>
|
|
<td ><code>set_footer</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>33</td>
|
|
<td ><code>footer</code></td>
|
|
<td >
|
|
Text Editor</td>
|
|
<td >
|
|
Footer
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<hr>
|
|
<h3>Controller</h3>
|
|
<h4>frappe.email.doctype.email_account.email_account</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 style="font-weight: normal;">Class <b>EmailAccount</b></h3>
|
|
|
|
<p style="padding-left: 30px;"><i>Inherits from frappe.model.document.Document</i></h4>
|
|
|
|
<div class="docs-attr-desc"><p></p>
|
|
</div>
|
|
<div style="padding-left: 30px;">
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="autoname" href="#autoname" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>autoname</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Set name as <code>email_account_name</code> or make title from email id.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="check_smtp" href="#check_smtp" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>check_smtp</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Checks SMTP settings.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_pop3" href="#get_pop3" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_pop3</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Returns logged in POP3 connection object.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_unreplied_notification_emails" href="#get_unreplied_notification_emails" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_unreplied_notification_emails</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Return list of emails listed</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="insert_communication" href="#insert_communication" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>insert_communication</b>
|
|
<i class="text-muted">(self, raw)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="on_trash" href="#on_trash" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>on_trash</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Clear communications where email account is linked</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="on_update" href="#on_update" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>on_update</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Check there is only one default of each type.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="receive" href="#receive" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>receive</b>
|
|
<i class="text-muted">(self, test_mails=None)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Called by scheduler to receive emails from this EMail account using POP3.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="send_auto_reply" href="#send_auto_reply" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>send_auto_reply</b>
|
|
<i class="text-muted">(self, communication, email)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Send auto reply if set.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="set_thread" href="#set_thread" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>set_thread</b>
|
|
<i class="text-muted">(self, communication, email)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>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.</p>
|
|
|
|
<p>If no thread id is found and <code>append_to</code> is set for the email account,
|
|
it will create a new parent transaction (e.g. Issue)</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="there_must_be_only_one_default" href="#there_must_be_only_one_default" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>there_must_be_only_one_default</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>If current Email Account is default, un-default all other accounts.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="validate" href="#validate" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>validate</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Validate email id and check POP3 and SMTP connections is enabled.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
</div>
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
<h3 style="font-weight: normal;">Class <b>SentEmailInInbox</b></h3>
|
|
|
|
<p style="padding-left: 30px;"><i>Inherits from exceptions.Exception</i></h4>
|
|
|
|
<div class="docs-attr-desc"><p></p>
|
|
</div>
|
|
<div style="padding-left: 30px;">
|
|
|
|
</div>
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><span class="label label-info">Public API</span>
|
|
<br><code>/api/method/frappe.email.doctype.email_account.email_account.get_append_to</code>
|
|
</p>
|
|
<p class="docs-attr-name">
|
|
<a name="frappe.email.doctype.email_account.email_account.get_append_to" href="#frappe.email.doctype.email_account.email_account.get_append_to" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
frappe.email.doctype.email_account.email_account.<b>get_append_to</b>
|
|
<i class="text-muted">(doctype=None, txt=None, searchfield=None, start=None, page_len=None, filters=None)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="frappe.email.doctype.email_account.email_account.notify_unreplied" href="#frappe.email.doctype.email_account.email_account.notify_unreplied" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
frappe.email.doctype.email_account.email_account.<b>notify_unreplied</b>
|
|
<i class="text-muted">()</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Sends email notifications if there are unreplied Communications
|
|
and <code>notify_if_unreplied</code> is set as true.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="frappe.email.doctype.email_account.email_account.pull" href="#frappe.email.doctype.email_account.email_account.pull" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
frappe.email.doctype.email_account.email_account.<b>pull</b>
|
|
<i class="text-muted">(now=False)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Will be called via scheduler, pull emails from all enabled POP3 email accounts.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4>Linked In:</h4>
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
|
|
<a href="https://frappe.github.io/frappe/current/models/core/communication">Communication</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- autodoc -->
|
|
<!-- jinja -->
|
|
<!-- static --> |