Question

I'm trying to set up the Mail plugin with my SES credentials, but I am obviously missing something because I keep getting this error:

Class: javax.mail.NoSuchProviderException
Message: No provider for aws

I've added the following to my Config.groovy:

grails {
    mail {
       host = "email-smtp.us-east-1.amazonaws.com"
       port = 465
       username = "XXXXXXXXX"
       password = "YYYYYYYYY"
       props = [
            'mail.transport.protocol': 'aws',
            'mail.aws.class': 'com.amazonaws.services.simpleemail.AWSJavaMailTransport',
            'mail.aws.user': 'WWWWWWWWWWWW',
            'mail.aws.password': 'ZZZZZZZZZZZ'
        ]
    }
 }

I've been looking through all the possible tutorials, half of them were from the time SES didn't support SMTP, thats why I have the class reference from the maven repo.

Does anyone know how I can configure this?

Was it helpful?

Solution

This is what I have been using successfully -

grails {
    mail {
        host = "email-smtp.us-east-1.amazonaws.com"
        port = 587
        username = "smtp user name"
        password = "smtp password"
        props = ["mail.smtp.starttls.enable":"true",
                    "mail.smtp.port":"587"]
    }
}

Let me know if the above works

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top