Navigation

    Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop
    1. Home
    2. Tags
    3. aws
    Log in to post
    • All categories
    • lahirunc

      Learn to use AWS Amplify Datastore with Flutter & GetX
      Hybrid App Development • flutter aws get • • lahirunc

      3
      2
      Votes
      3
      Posts
      197
      Views

      lahirunc

      @root thanks bro!

    • F

      Bulk Email AWS SES
      General Discussion • aws • • foxmolder

      8
      0
      Votes
      8
      Posts
      329
      Views

      F

      import smtplib
      import email.utils
      from email.mime.multipart import MIMEMultipart
      from email.mime.text import MIMEText

      fruits = ["[email protected]","[email protected]", ]
      for RECIPIENT in fruits:

      Replace [email protected] with your "From" address. This address must be verified. SENDER = '[email protected]' SENDERNAME = 'ex.com' Replace [email protected] with a "To" address. If your account is still in the sandbox, this address must be verified. RECIPIENT = '[email protected]' Replace smtp_username with your Amazon SES SMTP user name. USERNAME_SMTP = "" Replace smtp_password with your Amazon SES SMTP password. PASSWORD_SMTP = "" (Optional) the name of a configuration set to use for this message. If you comment out this line, you also need to remove or comment out the "X-SES-CONFIGURATION-SET:" header below. CONFIGURATION_SET = "ConfigSet" If you're using Amazon SES in an AWS Region other than US West (Oregon), replace email-smtp.us-west-2.amazonaws.com with the Amazon SES SMTP endpoint in the appropriate region. HOST = "email-smtp.us-east-2.amazonaws.com" PORT = 587 The subject line of the email. SUBJECT = ' ' The email body for recipients with non-HTML email clients. BODY_TEXT = ("" "" "" ) The HTML body of the email. BODY_HTML = """<html> </html> """ Create message container - the correct MIME type is multipart/alternative. msg = MIMEMultipart('alternative') msg['Subject'] = SUBJECT msg['From'] = email.utils.formataddr((SENDERNAME, SENDER)) msg['To'] = RECIPIENT Comment or delete the next line if you are not using a configuration set msg.add_header('X-SES-CONFIGURATION-SET',CONFIGURATION_SET) Record the MIME types of both parts - text/plain and text/html. part1 = MIMEText(BODY_TEXT, 'plain') part2 = MIMEText(BODY_HTML, 'html') Attach parts into message container. According to RFC 2046, the last part of a multipart message, in this case the HTML message, is best and preferred. msg.attach(part1) msg.attach(part2) Try to send the message. try: server = smtplib.SMTP(HOST, PORT) server.ehlo() server.starttls() #stmplib docs recommend calling ehlo() before & after starttls() server.login(USERNAME_SMTP, PASSWORD_SMTP) server.ehlo() server.sendmail(SENDER, RECIPIENT, msg.as_string()) server.close() Display an error message if something goes wrong. except Exception as e: print ("Error: ", e) else: print ("Email sent!")
    • shalukap

      AWS vs AZURE
      Cloud Computing • aws azure • • shalukap

      2
      1
      Votes
      2
      Posts
      145
      Views

      root

      AWS walata yanna .

    • Shashika Srimal

      Question on Serverless Microservices Project using AWS & NodeJs
      General Discussion • aws aws lambda microservices node serverless • • Shashika Srimal

      1
      0
      Votes
      1
      Posts
      64
      Views

      No one has replied

    • Nubelle

      November Meetup (Online) - AWS User Group Colombo
      Cloud Computing • aws • • Nubelle

      3
      3
      Votes
      3
      Posts
      94
      Views

      Nubelle

      @dev_lak welcome bro

    • uditha

      AWS architect Job opportunity.
      Job Portal • aws aws enterprise blue chip tech • • uditha

      1
      2
      Votes
      1
      Posts
      96
      Views

      No one has replied

    • A

      AWS Business/Enterprise එකවුන්ට් එකක් තියන කෙනෙක් ඉන්නවද?
      General Discussion • aws aws business aws enterprise • • abanpola

      1
      2
      Votes
      1
      Posts
      213
      Views

      No one has replied

    • A.M.Nagahwatte

      AWS Honeycode (build web and mobile apps without writing code)
      Blogs • aws web mobile app • • A.M.Nagahwatte

      1
      0
      Votes
      1
      Posts
      86
      Views

      No one has replied

    • Nubelle

      Getting Started with AWS Machine Learning
      Information Security • aws • • Nubelle

      7
      3
      Votes
      7
      Posts
      190
      Views

      Nubelle

      @isuru2014 welcome bro

    • dinlinux

      Amazon Web Services (AWS) Tutorial Part 1
      Cloud Computing • cloudcomputing aws amazon administrators • • dinlinux

      3
      1
      Votes
      3
      Posts
      678
      Views

      F

      nice article :smiley:, waiting for. next part