seitime-frappe/frappe/docs/current/api/email/frappe.email.bulk.html
2015-10-30 17:29:28 +05:30

197 lines
No EOL
6.7 KiB
HTML

<!-- title: frappe.email.bulk --><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/blob/develop/frappe/email/bulk.py"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
</div>
<h3 style="font-weight: normal;">Class <b>BulkLimitCrossedError</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
<div class="docs-attr-desc"><p></p>
</div>
<div style="padding-left: 30px;">
</div>
<hr>
<p class="docs-attr-name">
<a name="frappe.email.bulk.add" href="#frappe.email.bulk.add" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>add</b>
<i class="text-muted">(email, sender, subject, formatted, text_content=None, reference_doctype=None, reference_name=None, attachments=None, reply_to=None, cc=(), message_id=None, send_after=None, bulk_priority=1)</i>
</p>
<div class="docs-attr-desc"><p>add to bulk mail queue</p>
</div>
<br>
<p class="docs-attr-name">
<a name="frappe.email.bulk.check_bulk_limit" href="#frappe.email.bulk.check_bulk_limit" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>check_bulk_limit</b>
<i class="text-muted">(recipients)</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.bulk.clear_outbox" href="#frappe.email.bulk.clear_outbox" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>clear_outbox</b>
<i class="text-muted">()</i>
</p>
<div class="docs-attr-desc"><p>Remove mails older than 31 days in Outbox. Called daily via scheduler.</p>
</div>
<br>
<p class="docs-attr-name">
<a name="frappe.email.bulk.flush" href="#frappe.email.bulk.flush" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>flush</b>
<i class="text-muted">(from_test=False)</i>
</p>
<div class="docs-attr-desc"><p>flush email queue, every time: called from scheduler</p>
</div>
<br>
<p class="docs-attr-name">
<a name="frappe.email.bulk.get_unsubcribed_url" href="#frappe.email.bulk.get_unsubcribed_url" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>get_unsubcribed_url</b>
<i class="text-muted">(reference_doctype, reference_name, email, unsubscribe_method, unsubscribe_params)</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.bulk.get_unsubscribe_link" href="#frappe.email.bulk.get_unsubscribe_link" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>get_unsubscribe_link</b>
<i class="text-muted">(reference_doctype, reference_name, email, recipients, expose_recipients, show_as_cc, unsubscribe_method, unsubscribe_params, unsubscribe_message)</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.bulk.return_unsubscribed_page" href="#frappe.email.bulk.return_unsubscribed_page" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>return_unsubscribed_page</b>
<i class="text-muted">(email, doctype, name)</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.bulk.send" href="#frappe.email.bulk.send" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>send</b>
<i class="text-muted">(recipients=None, sender=None, subject=None, message=None, reference_doctype=None, reference_name=None, unsubscribe_method=None, unsubscribe_params=None, unsubscribe_message=None, attachments=None, reply_to=None, cc=(), show_as_cc=(), message_id=None, send_after=None, expose_recipients=False, bulk_priority=1)</i>
</p>
<div class="docs-attr-desc"><p>Add email to sending queue (Bulk Email)</p>
<p><strong>Parameters:</strong></p>
<ul>
<li><strong><code>recipients</code></strong> - List of recipients.</li>
<li><strong><code>sender</code></strong> - Email sender.</li>
<li><strong><code>subject</code></strong> - Email subject.</li>
<li><strong><code>message</code></strong> - Email message.</li>
<li><strong><code>reference_doctype</code></strong> - Reference DocType of caller document.</li>
<li><strong><code>reference_name</code></strong> - Reference name of caller document.</li>
<li><strong><code>bulk_priority</code></strong> - Priority for bulk email, default 1.</li>
<li><strong><code>unsubscribe_method</code></strong> - URL method for unsubscribe. Default is <code>/api/method/frappe.email.bulk.unsubscribe</code>.</li>
<li><strong><code>unsubscribe_params</code></strong> - additional params for unsubscribed links. default are name, doctype, email</li>
<li><strong><code>attachments</code></strong> - Attachments to be sent.</li>
<li><strong><code>reply_to</code></strong> - Reply to be captured here (default inbox)</li>
<li><strong><code>message_id</code></strong> - Used for threading. If a reply is received to this email, Message-Id is sent back as In-Reply-To in received email.</li>
<li><strong><code>send_after</code></strong> - Send this email after the given datetime. If value is in integer, then <code>send_after</code> will be the automatically set to no of days from current date.</li>
</ul>
</div>
<br>
<p><span class="label label-info">Public API</span>
<br><code>/api/method/frappe.email.bulk.unsubscribe</code>
</p>
<p class="docs-attr-name">
<a name="frappe.email.bulk.unsubscribe" href="#frappe.email.bulk.unsubscribe" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
frappe.email.bulk.<b>unsubscribe</b>
<i class="text-muted">(doctype, name, email)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<br>
<!-- autodoc -->