email - javax.mail exception running a Grails app on heroku -
i have grails app on heroku , started getting exception, when ever email sent: javax.mail.messagingexception:
could not connect smtp host: smtpout.secureserver.net, port: 25, response: 554 i did restart on app , things came normal, heroku sending mails again, did nil code, guess things can malfunction 1 time again @ moment.
i'm using javax.mail send emails, grails mail service plugin, works in other servers.
i read in heroku back upwards needed utilize external smtp service, says can utilize javax.mail build mail service functionality on top of external smtp services, so, can't utilize javax.mail without external smtp service in heroku? why that? why send emails while without external smtp service? wich best selection external smtp service in heroku addons?
thanks
hi ana few things there:
javax.mail.messagingexception: not connect smtp host : <host name> port : 25 response: 554
check out above link
if actual msg returned: smtpout.secureserver.net, port: 25
then suggest when next happens open terminal box hosting site , run
telnet smtpout.secureserver.net 25 or
nc -z -v smtpout.secureserver.net 25 here local host check:
nc -z -v localhost 25 nc: connect localhost port 25 (tcp) failed: connection refused nc -z -v localhost 22 connection localhost 22 port [tcp/ssh] succeeded! i check out
netstat -plant |grep ":25" i think may if external smtp server flooded , can not take more connections, app has flooded , caused have no more pool connections , restart has removed waiting tasks
it maybe worth while writing cron entry checks how many outgoing smtp connections open @ time , above amount alert - way can see when coming
just in case ever happens 1 time again - there things research :
i start looking @ testing plugins @ bottom , setting demo site seek work out going on -
also may related content beingness sent email why had crashed - wrong etc... (so trying capture happened @ time of real use)
grails-tcpmon http://grails.org/plugin/tcpmon
significant mail service : http://grails.org/plugin/sendgrid http://grails.org/plugin/postmark
asynchronus mail: http://grails.org/plugin/asynchronous-mail
using log4j sending emails: http://www.nofluffjuststuff.com/blog/burt_beckwith/2010/02/using_gmail_with_a_log4j_smtp_appender_in_grails
http://www.intelligrape.com/blog/2012/08/13/send-mail-via-log4j-with-smtp-appender/
testing: http://grails.org/plugin/greenmail http://grails.org/plugin/dumbster
email grails heroku
No comments:
Post a Comment