camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Kaplan <grou...@memelet.com>
Subject Sending via smtp fails after some time
Date Thu, 07 Apr 2011 14:46:14 GMT
I am sending emails from a server. The emails get sent fine for some hours
(up to 24) but then I start getting exceptions that are ultimately:

  Caused by: javax.mail.AuthenticationFailedException: null

I am using the default javaMailSender and sending via gmail. The jvm is
started with Dmail.smtp.starttls.enable=true.

Any ideas what would cause gmail to accept the messages and then decide
later to reject the auth?

(camel 2.5.0)

thanks!


---- (the #'s are substituted by the scala compiler)
---------------------------------------------------
  private lazy val smtpUri =
"smtp://#{smtpHost}:#{smtpPort}?username=#{smtpUsername}&password=#{smtpPassword}"

      val msg = "Alert for device '#{device.name}'. #{alert.description}."
      log.info("Sending notification: to=#toEmail, msg=#msg") 
      val headers = Map[String,Object](
        "To" -> toEmail,
        "From" -> "support@vimana.us",
        "Subject" -> "Device Alert: #device.name - #alert.definition.name")
      producerTemplate.sendBodyAndHeaders(smtpUri, msg, headers.asJava)


--
View this message in context: http://camel.465427.n5.nabble.com/Sending-via-smtp-fails-after-some-time-tp4288728p4288728.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message