<commit_before>// snippet-sourcedescription:[SendMessageAttachment.kt demonstrates how to send an email message with an attachment by using the Amazon Simple Email Service (Amazon SES).]
// snippet-keyword:[AWS SDK for Kotlin]
// snippet-keyword:[Amazon Simple Email Service]
// snippet-keyword:[Code Sample]
// snippet-sourcetype:[full-example]
// snippet-sourcedate:[06/23/2020]
// snippet-sourceauthor:[AWS-scmacdon]

/*
   Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
   SPDX-License-Identifier: Apache-2.0
*/

package com.kotlin.ses

// snippet-start:[ses.kotlin.sendmessageattachment.import]
import aws.sdk.kotlin.services.ses.SesClient
import aws.sdk.kotlin.services.ses.model.RawMessage
import aws.sdk.kotlin.services.ses.model.SendRawEmailRequest
import aws.sdk.kotlin.services.ses.model.SesException
import java.io.ByteArrayOutputStream
import java.io.File
import java.nio.file.Files
import java.util.*
import javax.activation.DataHandler
import javax.activation.DataSource
import javax.mail.Message
import javax.mail.MessagingException
import javax.mail.Session
import javax.mail.internet.InternetAddress
import javax.mail.internet.MimeBodyPart
import javax.mail.internet.MimeMessage
import javax.mail.internet.MimeMultipart
import javax.mail.util.ByteArrayDataSource
import kotlin.system.exitProcess
// snippet-start:[ses.kotlin.sendmessageattachment.main]

suspend fun main(args:Array<String>) {

    val usage = """

    Usage:
        <sender> <recipient> <subject> <fileLocation> 

    Where:
        sender - an email address that represents the sender. 
        recipient -  an email address that represents the recipient. 
        subject - the  subject line. 
        fileLocation - the location of a Microsoft Excel file to use as an attachment (C:/AWS/customers.xls). 
    """
<commit_msg>Update SendMessageEmailAttachment.kt<commit_after>// snippet-sourcedescription:[SendMessageAttachment.kt demonstrates how to send an email message with an attachment by using the Amazon Simple Email Service (Amazon SES).]
// snippet-keyword:[AWS SDK for Kotlin]
// snippet-keyword:[Amazon Simple Email Service]
// snippet-keyword:[Code Sample]
// snippet-sourcetype:[full-example]
// snippet-sourcedate:[06/23/2020]
// snippet-sourceauthor:[AWS-scmacdon]

/*
   Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
   SPDX-License-Identifier: Apache-2.0
*/

package com.kotlin.ses

// snippet-start:[ses.kotlin.sendmessageattachment.import]
import aws.sdk.kotlin.services.ses.SesClient
import aws.sdk.kotlin.services.ses.model.RawMessage
import aws.sdk.kotlin.services.ses.model.SendRawEmailRequest
import aws.sdk.kotlin.services.ses.model.SesException
import java.io.ByteArrayOutputStream
import java.io.File
import java.nio.file.Files
import java.util.*
import javax.activation.DataHandler
import javax.activation.DataSource
import javax.mail.Message
import javax.mail.MessagingException
import javax.mail.Session
import javax.mail.internet.InternetAddress
import javax.mail.internet.MimeBodyPart
import javax.mail.internet.MimeMessage
import javax.mail.internet.MimeMultipart
import javax.mail.util.ByteArrayDataSource
import kotlin.system.exitProcess
// snippet-end:[ses.kotlin.sendmessageattachment.main]

suspend fun main(args:Array<String>) {

    val usage = """

    Usage:
        <sender> <recipient> <subject> <fileLocation> 

    Where:
        sender - an email address that represents the sender. 
        recipient -  an email address that represents the recipient. 
        subject - the  subject line. 
        fileLocation - the location of a Microsoft Excel file to use as an attachment (C:/AWS/customers.xls). 
    """

{'fraction_non_alphanumeric': 0.1000813669650122, 'fraction_numerical': 0.005424464334147003, 'mean_word_length': 4.291248206599713, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2658154', 'n_tokens_mistral': 1145, 'n_tokens_neox': 1053, 'n_words': 265}