Skip to main content

In this article, we'll configure the AWS SES to send the emails and Integration with On-prem SCH

  1. First, we need to go to AWS → Simple Email Service (SES)
  2. Then we need to go to Email Addresses

       3. Then we need to specify the email address which we want to use for sending emails 

        ( We need to click on Verify a New Email Address)

       4. After adding email address,  AWS will send a verification email to the address which we’ve defined and we need to click on the verification link. After verification, we can see our email address status in verified mode.
 

       5. After verification, we need to generate SMTP credentials by clicking SMTP Settings.

       6. After this, we need to generate credentials by clicking on Create My SMTP Credentials. We need to give the name of the IAM user which will be created by this step and it’ll generate the SMTP username and SMTP password which we need to download and close this window.
 

 

SCH on-prem configuration 

  1. We need to update the $DPM_CONF/common-to-all-apps.properties file  
    • For transport protocol SMTP we need to use 587 port with below configuration
      mail.transport.protocol=smtp
      mail.smtp.host=<endpoint>
      mail.smtp.port=587
      # The possible value is "true" or "false"
      mail.smtp.auth=true

      # The possible values is "true" or "false"
      mail.smtp.starttls.enable=true

      xmail.username=<username>
      xmail.password=<password>
      # FROM email address to use for the messages
      xmail.from.address=test@mail.com (Here we need to update the Email address which we want to use for sending mails)

      and needs to restart the DPM service. 

  2. For transport protocol SMTPS we need import SSL certificate using the below commands and  need to use 465 port with below configuration (mentioned in print screen)” 
    $ openssl s_client -connect <endpoint>:465 ​

    $ keytool import -file <certificate_file.crt> -keystore <SCH-truststore-file> -alias     <sch-certs>
     
    mail.transport.protocol=smtps
    mail.smtp.starttls.enable=true
    mail.smtps.host=<endpoint>
    mail.smtps.port=465
    mail.smtps.auth=true
    xmail.username=<username>
    xmail.password=<password>

    # FROM email address to use for the messages
    xmail.from.address=test@mail (Here we need to update the Email address which we want to use for sending mails)

    After updating the configs we need to restart the DPM service.

@AkshayJadhav i get an exception 

Error sending email : com.streamsets.datacollector.email.EmailException: com.sun.mail.smtp.SMTPSendFailedException: 554 Message rejected: Email address is not verified. The following identities failed the check in region AP-SOUTH-1: abcd@gmai.com

 

even though i have verified the email address in AWS SES.

for your info below are my configrations:

mail.transport.protocol=smtp
mail.smtp.host=email-smtp.ap-south-1.amazonaws.com
mail.smtp.port=587
mail.smtp.auth=true
mail.smtp.starttls.enable=true
mail.smtps.host=localhost
mail.smtps.port=465
mail.smtps.auth=false
# If 'mail.smtp.auth' or 'mail.smtps.auth' are to true, these properties are used for the user/password credentials,
# ${file("email-password.txt")} will load the value from the 'email-password.txt' file in the config directory (where this file is)
xmail.username=<generated SMPT IAM username>
xmail.password=<generated i am password>
# FROM email address to use for the messages
xmail.from.address=abcd@gmail.com

 

where do i go wrong


Reply