383 lines
9.6 KiB
HTML
383 lines
9.6 KiB
HTML
<!-- title: Newsletter -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="dev-header">
|
|
|
|
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
|
Version 6.x.x</a>
|
|
|
|
|
|
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/erpnext/crm/doctype/newsletter"
|
|
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>tabNewsletter</code></p>
|
|
|
|
|
|
Create and Send Newsletters
|
|
|
|
<h3>Fields</h3>
|
|
|
|
<table class="table table-bordered">
|
|
<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 >
|
|
<td>1</td>
|
|
<td class="danger" title="Mandatory"><code>newsletter_list</code></td>
|
|
<td >
|
|
Link</td>
|
|
<td >
|
|
Newsletter List
|
|
|
|
</td>
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<a href="https://frappe.github.io/erpnext/current/models/crm/newsletter_list">Newsletter List</a>
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>2</td>
|
|
<td class="danger" title="Mandatory"><code>subject</code></td>
|
|
<td >
|
|
Small Text</td>
|
|
<td >
|
|
Subject
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>3</td>
|
|
<td ><code>send_from</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Sender
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>4</td>
|
|
<td ><code>email_sent</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Email Sent?
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>5</td>
|
|
<td ><code>newsletter_content</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>6</td>
|
|
<td class="danger" title="Mandatory"><code>message</code></td>
|
|
<td >
|
|
Text Editor</td>
|
|
<td >
|
|
Message
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>7</td>
|
|
<td ><code>test_the_newsletter</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>8</td>
|
|
<td ><code>test_email_id</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Test Email Id
|
|
<p class="text-muted small">
|
|
A Lead with this email id should exist</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>9</td>
|
|
<td ><code>test_send</code></td>
|
|
<td >
|
|
Button</td>
|
|
<td >
|
|
Test
|
|
|
|
</td>
|
|
<td>
|
|
<pre>test_send</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<hr>
|
|
<h3>Controller</h3>
|
|
<h4>erpnext.crm.doctype.newsletter.newsletter</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 style="font-weight: normal;">Class <b>Newsletter</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="get_recipients" href="#get_recipients" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_recipients</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Get recipients from Newsletter List</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="onload" href="#onload" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>onload</b>
|
|
<i class="text-muted">(self)</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="send_bulk" href="#send_bulk" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>send_bulk</b>
|
|
<i class="text-muted">(self)</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="send_emails" href="#send_emails" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>send_emails</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>send emails to leads and customers</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="test_send" href="#test_send" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>test_send</b>
|
|
<i class="text-muted">(self, doctype=Lead)</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="validate_send" href="#validate_send" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>validate_send</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
</div>
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><span class="label label-info">Public API</span>
|
|
<br><code>/api/method/erpnext.crm.doctype.newsletter.newsletter.confirm_subscription</code>
|
|
</p>
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.crm.doctype.newsletter.newsletter.confirm_subscription" href="#erpnext.crm.doctype.newsletter.newsletter.confirm_subscription" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.crm.doctype.newsletter.newsletter.<b>confirm_subscription</b>
|
|
<i class="text-muted">(email)</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="erpnext.crm.doctype.newsletter.newsletter.create_lead" href="#erpnext.crm.doctype.newsletter.newsletter.create_lead" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.crm.doctype.newsletter.newsletter.<b>create_lead</b>
|
|
<i class="text-muted">(email_id)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>create a lead if it does not exist</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><span class="label label-info">Public API</span>
|
|
<br><code>/api/method/erpnext.crm.doctype.newsletter.newsletter.get_lead_options</code>
|
|
</p>
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.crm.doctype.newsletter.newsletter.get_lead_options" href="#erpnext.crm.doctype.newsletter.newsletter.get_lead_options" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.crm.doctype.newsletter.newsletter.<b>get_lead_options</b>
|
|
<i class="text-muted">()</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="erpnext.crm.doctype.newsletter.newsletter.return_unsubscribed_page" href="#erpnext.crm.doctype.newsletter.newsletter.return_unsubscribed_page" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.crm.doctype.newsletter.newsletter.<b>return_unsubscribed_page</b>
|
|
<i class="text-muted">(email)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><span class="label label-info">Public API</span>
|
|
<br><code>/api/method/erpnext.crm.doctype.newsletter.newsletter.subscribe</code>
|
|
</p>
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.crm.doctype.newsletter.newsletter.subscribe" href="#erpnext.crm.doctype.newsletter.newsletter.subscribe" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.crm.doctype.newsletter.newsletter.<b>subscribe</b>
|
|
<i class="text-muted">(email)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p><span class="label label-info">Public API</span>
|
|
<br><code>/api/method/erpnext.crm.doctype.newsletter.newsletter.unsubscribe</code>
|
|
</p>
|
|
<p class="docs-attr-name">
|
|
<a name="erpnext.crm.doctype.newsletter.newsletter.unsubscribe" href="#erpnext.crm.doctype.newsletter.newsletter.unsubscribe" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
erpnext.crm.doctype.newsletter.newsletter.<b>unsubscribe</b>
|
|
<i class="text-muted">(email, name)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- autodoc -->
|
|
<!-- jinja -->
|
|
<!-- static --> |