<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bulk Email AWS SES]]></title><description><![CDATA[<p dir="auto">aws ses වල එක පාර ඊමේල් ලිස්ට් එකකට ඊමේල් යවන්න ක්‍රමයක් තියෙනවද .?</p>
]]></description><link>https://lankadevelopers.lk/topic/862/bulk-email-aws-ses</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 07:01:05 GMT</lastBuildDate><atom:link href="https://lankadevelopers.lk/topic/862.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 Oct 2021 15:51:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bulk Email AWS SES on Tue, 12 Oct 2021 06:38:07 GMT]]></title><description><![CDATA[<p dir="auto">import smtplib<br />
import email.utils<br />
from email.mime.multipart import MIMEMultipart<br />
from email.mime.text import MIMEText</p>
<p dir="auto">fruits = ["<a href="mailto:ex@gmail.com" target="_blank" rel="noopener noreferrer nofollow ugc">ex@gmail.com</a>"<a href="mailto:,%22ex2@gmail.com.com" target="_blank" rel="noopener noreferrer nofollow ugc">,"ex2@gmail.com.com</a>",  ]<br />
for RECIPIENT in fruits:</p>
<h1>Replace <a href="mailto:sender@example.com" target="_blank" rel="noopener noreferrer nofollow ugc">sender@example.com</a> with your "From" address.</h1>
<h1>This address must be verified.</h1>
<pre><code>SENDER = 'ex@gmail.com'
SENDERNAME = 'ex.com'
</code></pre>
<h1>Replace <a href="mailto:recipient@example.com" target="_blank" rel="noopener noreferrer nofollow ugc">recipient@example.com</a> with a "To" address. If your account</h1>
<h1>is still in the sandbox, this address must be verified.</h1>
<h1>RECIPIENT  = 'ex@gmail.com'</h1>
<h1>Replace smtp_username with your Amazon SES SMTP user name.</h1>
<pre><code>USERNAME_SMTP = ""
</code></pre>
<h1>Replace smtp_password with your Amazon SES SMTP password.</h1>
<pre><code>PASSWORD_SMTP = ""
</code></pre>
<h1>(Optional) the name of a configuration set to use for this message.</h1>
<h1>If you comment out this line, you also need to remove or comment out</h1>
<h1>the "X-SES-CONFIGURATION-SET:" header below.</h1>
<h1>CONFIGURATION_SET = "ConfigSet"</h1>
<h1>If you're using Amazon SES in an AWS Region other than US West (Oregon),</h1>
<h1>replace <a href="http://email-smtp.us-west-2.amazonaws.com" target="_blank" rel="noopener noreferrer nofollow ugc">email-smtp.us-west-2.amazonaws.com</a> with the Amazon SES SMTP</h1>
<h1>endpoint in the appropriate region.</h1>
<pre><code>HOST = "email-smtp.us-east-2.amazonaws.com"
PORT = 587
</code></pre>
<h1>The subject line of the email.</h1>
<pre><code>SUBJECT = ' '
</code></pre>
<h1>The email body for recipients with non-HTML email clients.</h1>
<pre><code>BODY_TEXT = (""
         ""
         ""
        )
</code></pre>
<h1>The HTML body of the email.</h1>
<pre><code>BODY_HTML = """&lt;html&gt;

&lt;/html&gt;


        """
</code></pre>
<h1>Create message container - the correct MIME type is multipart/alternative.</h1>
<pre><code>msg = MIMEMultipart('alternative')
msg['Subject'] = SUBJECT
msg['From'] = email.utils.formataddr((SENDERNAME, SENDER))
msg['To'] = RECIPIENT
</code></pre>
<h1>Comment or delete the next line if you are not using a configuration set</h1>
<h1>msg.add_header('X-SES-CONFIGURATION-SET',CONFIGURATION_SET)</h1>
<h1>Record the MIME types of both parts - text/plain and text/html.</h1>
<pre><code>part1 = MIMEText(BODY_TEXT, 'plain')
part2 = MIMEText(BODY_HTML, 'html')
</code></pre>
<h1>Attach parts into message container.</h1>
<h1>According to RFC 2046, the last part of a multipart message, in this case</h1>
<h1>the HTML message, is best and preferred.</h1>
<pre><code>msg.attach(part1)
msg.attach(part2)
</code></pre>
<h1>Try to send the message.</h1>
<pre><code>try:
    server = smtplib.SMTP(HOST, PORT)
    server.ehlo()
    server.starttls()
#stmplib docs recommend calling ehlo() before &amp; after starttls()
    server.login(USERNAME_SMTP, PASSWORD_SMTP)
    server.ehlo()
    server.sendmail(SENDER, RECIPIENT, msg.as_string())
    server.close()
</code></pre>
<h1>Display an error message if something goes wrong.</h1>
<pre><code>except Exception as e:
    print ("Error: ", e)
else:
    print ("Email sent!")
</code></pre>
]]></description><link>https://lankadevelopers.lk/post/4590</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4590</guid><dc:creator><![CDATA[foxmolder]]></dc:creator><pubDate>Tue, 12 Oct 2021 06:38:07 GMT</pubDate></item><item><title><![CDATA[Reply to Bulk Email AWS SES on Tue, 12 Oct 2021 06:33:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/27">@root</a> eyala time eka manage karanawa. eth bounce rate eka handle karaganna eka thamai amaru.. mage code eka danna puluwan methana kawru hari innawa nam bounce rate eka manage karana script eka ekata ekathu karala improve karanna</p>
]]></description><link>https://lankadevelopers.lk/post/4589</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4589</guid><dc:creator><![CDATA[foxmolder]]></dc:creator><pubDate>Tue, 12 Oct 2021 06:33:01 GMT</pubDate></item><item><title><![CDATA[Reply to Bulk Email AWS SES on Mon, 11 Oct 2021 07:58:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/1715">@foxmolder</a></p>
<p dir="auto">email limit ekak thiyenawa ses wala, oka yawanne one queue  ekak widiyata</p>
]]></description><link>https://lankadevelopers.lk/post/4588</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4588</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Mon, 11 Oct 2021 07:58:33 GMT</pubDate></item><item><title><![CDATA[Reply to Bulk Email AWS SES on Sun, 10 Oct 2021 12:54:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/1743">@xenon</a> eyala dela thiyena sample code ekakata for loop ekak ekak and array ekak use karala</p>
]]></description><link>https://lankadevelopers.lk/post/4587</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4587</guid><dc:creator><![CDATA[foxmolder]]></dc:creator><pubDate>Sun, 10 Oct 2021 12:54:48 GMT</pubDate></item><item><title><![CDATA[Reply to Bulk Email AWS SES on Sat, 09 Oct 2021 11:41:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/1715">@foxmolder</a> otp requests yawalada?</p>
]]></description><link>https://lankadevelopers.lk/post/4584</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4584</guid><dc:creator><![CDATA[Xenon]]></dc:creator><pubDate>Sat, 09 Oct 2021 11:41:50 GMT</pubDate></item><item><title><![CDATA[Reply to Bulk Email AWS SES on Thu, 07 Oct 2021 16:26:46 GMT]]></title><description><![CDATA[<p dir="auto">Simple python script ekakin bulk yawanna puluwan..</p>
]]></description><link>https://lankadevelopers.lk/post/4582</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4582</guid><dc:creator><![CDATA[foxmolder]]></dc:creator><pubDate>Thu, 07 Oct 2021 16:26:46 GMT</pubDate></item><item><title><![CDATA[Reply to Bulk Email AWS SES on Fri, 01 Oct 2021 21:18:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://lankadevelopers.lk/uid/1715">@foxmolder</a></p>
<p dir="auto">ehema nam na bulk email yawanna puluwan software ekak use karanna wenawa, aws ses kiyanne email service ekak</p>
]]></description><link>https://lankadevelopers.lk/post/4576</link><guid isPermaLink="true">https://lankadevelopers.lk/post/4576</guid><dc:creator><![CDATA[root]]></dc:creator><pubDate>Fri, 01 Oct 2021 21:18:21 GMT</pubDate></item></channel></rss>