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" -> "supp...@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.

Reply via email to