Quantcast

Using Grails plugin to send SES mails

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using Grails plugin to send SES mails

Akhila Lankala
Use-case - I need to send confirmation emails from my application.
I'm currently using Grails Mail plugin to do this. But in production, we need to use Amazon SES to send mails.
I followed http://roshandawrani.wordpress.com/2011/04/06/grails-using-mail-plugin-with-amazon-email-service/ article to setup my application to send mails through SES. But one of the steps is -

beans {
      MailSender mailSender = new JavaMailSenderImpl();
        mailSender.host = '';
}

Where do I set this - i mean which file do I include this. I wrote this code in my application's resources.xml, but I get
| Error 2012-02-27 13:42:41,454 [http-bio-8080-exec-9] ERROR emailconfirmation.EmailConfirmationService  - Mail send failed
Message: Failed messages: javax.mail.SendFailedException: Unable to send email;
  nested exception is:
        com.amazonaws.AmazonClientException: Unable to execute HTTP request: Connection to https://localhost refused
   Line | Method
->> 102 | sendMessage      in grails.plugin.mail.MailMessageBuilder
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    39 | sendMail         in grails.plugin.mail.MailService
|    79 | sendConfirmation in com.grailsrocks.emailconfirmation.EmailConfirmationService


Can anyone please let me know what I'm doing wrong here. Any help is greatly appreciated.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Using Grails plugin to send SES mails

lucastex
You have 2 easy ways to do it:

1) Use grails-aws plugin

2) Configure a SMTP host to your SES service easily in AWS Console and use regular SMTP config with it.

If your application use mail plugin with regular SMTP server in dev and test, probably option #2 will fit better.


[]s,
  




On Mon, Feb 27, 2012 at 6:45 PM, Akhila Lankala <[hidden email]> wrote:
Use-case - I need to send confirmation emails from my application.
I'm currently using Grails Mail plugin to do this. But in production, we
need to use Amazon SES to send mails.
I followed
http://roshandawrani.wordpress.com/2011/04/06/grails-using-mail-plugin-with-amazon-email-service/
article to setup my application to send mails through SES. But one of the
steps is -

beans {
     MailSender mailSender = new JavaMailSenderImpl();
       mailSender.host = '';
}

Where do I set this - i mean which file do I include this. I wrote this code
in my application's resources.xml, but I get
| Error 2012-02-27 13:42:41,454 [http-bio-8080-exec-9] ERROR
emailconfirmation.EmailConfirmationService  - Mail send failed
Message: Failed messages: javax.mail.SendFailedException: Unable to send
email;
 nested exception is:
       com.amazonaws.AmazonClientException: Unable to execute HTTP request:
Connection to https://localhost refused
  Line | Method
->> 102 | sendMessage      in grails.plugin.mail.MailMessageBuilder
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|    39 | sendMail         in grails.plugin.mail.MailService
|    79 | sendConfirmation in
com.grailsrocks.emailconfirmation.EmailConfirmationService


Can anyone please let me know what I'm doing wrong here. Any help is greatly
appreciated.

--
View this message in context: http://grails.1312388.n4.nabble.com/Using-Grails-plugin-to-send-SES-mails-tp4426170p4426170.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Loading...