brotherton-erpnext/erpnext/docs/current/models/crm/newsletter.md

9.6 KiB

Version 6.x.x
<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>
<p><b>Table Name:</b> <code>tabNewsletter</code></p>

Create and Send Newsletters

Fields

    <tr >
        <td>1</td>
        <td class="danger" title="Mandatory"><code>newsletter_list</code></td>
        <td >
            Link</td>
        <td >
            Newsletter List
            
        </td>
        <td>

Newsletter List

        </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>
Sr Fieldname Type Label Options
<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>
<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>

<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>

<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>

<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>

<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>

<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>
<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>

<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>

<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>

<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>

<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>

<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>