Not able to send Email using Amazon SES in Java

前端 未结 2 1567
难免孤独
难免孤独 2021-01-24 02:18

I am using below mentioned code to send Email.

public static void send(String email, String subject, String body) {
    try {
        fromEmail = \"abc.@xyz.com\         


        
2条回答
  •  长发绾君心
    2021-01-24 02:51

    The credentials you are providing is incorrect. You are giving IAM username and password. Instead you have to provide the access_key_id and access_key_id.

    AWSCredentials credentials = new BasicAWSCredentials(access_key_id, secret_access_key)
    

    See: Providing AWS Credentials in the AWS SDK for Java

提交回复
热议问题