Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop
    1. Home
    2. foxmolder
    3. Topics
    F
    • Profile
    • Following 0
    • Followers 1
    • Topics 5
    • Posts 17
    • Best 1
    • Controversial 0
    • Groups 0

    Topics created by foxmolder

    • F

      මොනවද මේ සංකේත ����
      General Discussion • laravel laravel 8 • • foxmolder

      14
      2
      Votes
      14
      Posts
      779
      Views

      lkdev

      @foxmolder

      dm karanna

    • F

      How to add pagination to the values coming from an API
      General Discussion • php • • foxmolder

      3
      0
      Votes
      3
      Posts
      404
      Views

      F

      any example

    • F

      laravel multi language routes
      Laravel Framework • laravel multi-language • • foxmolder

      1
      0
      Votes
      1
      Posts
      281
      Views

      No one has replied

    • F

      Bulk Email AWS SES
      General Discussion • aws • • foxmolder

      8
      0
      Votes
      8
      Posts
      712
      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!")
    • F

      කොහොමද Nginx ෆයිල් රුට් එකක් Rewrite කරගන්නේ
      General Discussion • nginx • • foxmolder

      4
      0
      Votes
      4
      Posts
      584
      Views

      root

      ahh oka nginx location { } eken serve karanna , nathnam sudomain ekak denna

    • 1 / 1