Uploaded image for project: 'JIRA Service Desk Server'
  1. JIRA Service Desk Server
  2. JSDSERVER-885

Mail handler doesn't work using CC field

    XMLWordPrintable

    Details

      Description

      When using Service Desk incoming mail handler, requests are not being created if incoming mail address is in the Cc field (not in the To field)

      If only the Cc field is used (To field left empty), mail handler

      Steps to reproduce

      1. Setup Service Desk mail handler
      2. Send email to SD mail handler in the Cc field

      Expected results

      1. Request should be created successfully

      Actual results
      If there's any email in the To field, JIRA throws the following in the logs and moves on to the next mail

      2014-09-30 10:56:58,948 atlassian-scheduler-quartz1.clustered_Worker-3 DEBUG ServiceRunner    Mail handler used by JIRA Service Desk. Do not modify or delete. 10,101 [atlassian.mail.incoming.sd] The message has been rejected (This email address is not used by this service desk any more.): From :[Marcus Silveira <sender email address>], Subject: Testing incoming mail handler on Cc, Date:
      

      If To field is left empty, mail handler throws a nullpointer exception and stops handling any messages after that

      2014-09-30 10:31:48,447 atlassian-scheduler-quartz1.clustered_Worker-4 ERROR anonymous    Mail handler used by JIRA Service Desk. Do not modify or delete. 10,000 [atlassian.jira.service.ServiceRunner] An error occurred while trying to run service 'Mail handler used by JIRA Service Desk. Do not modify or delete. 10,000'. null
      java.lang.NullPointerException
      	at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:114)
      	at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:114)
      	at scala.collection.SeqLike$class.size(SeqLike.scala:106)
      	at scala.collection.mutable.ArrayOps$ofRef.size(ArrayOps.scala:108)
      	at scala.collection.mutable.Builder$class.sizeHint(Builder.scala:69)
      	at scala.collection.mutable.ListBuffer.sizeHint(ListBuffer.scala:45)
      	at scala.collection.TraversableLike$class.to(TraversableLike.scala:628)
      	at scala.collection.mutable.ArrayOps$ofRef.to(ArrayOps.scala:108)
      	at scala.collection.TraversableOnce$class.toList(TraversableOnce.scala:257)
      	at scala.collection.mutable.ArrayOps$ofRef.toList(ArrayOps.scala:108)
      	at com.atlassian.servicedesk.internal.feature.incomingemail.IncomingEmailService.com$atlassian$servicedesk$internal$feature$incomingemail$IncomingEmailService$$getEmailSettingFromMessage(IncomingEmailService.scala:101)
      	at com.atlassian.servicedesk.internal.feature.incomingemail.IncomingEmailService$$anonfun$createIssueFromEmail$1.apply(IncomingEmailService.scala:61)
      	at com.atlassian.servicedesk.internal.feature.incomingemail.IncomingEmailService$$anonfun$createIssueFromEmail$1.apply(IncomingEmailService.scala:60)
      	at scala.util.Either$RightProjection.flatMap(Either.scala:523)
      	at com.atlassian.servicedesk.internal.feature.incomingemail.IncomingEmailService.createIssueFromEmail(IncomingEmailService.scala:60)
      	at com.atlassian.servicedesk.internal.feature.incomingemail.IncomingEmailService.processEmail(IncomingEmailService.scala:48)
      	at com.atlassian.servicedesk.internal.email.SDMailHandler.processMessage(SDMailHandler.java:36)
      	at com.atlassian.servicedesk.squalor.email.AbstractMailHandler.handleMessage(AbstractMailHandler.java:100)
      	at com.atlassian.servicedesk.squalor.email.SDMessageProcessor.execute(SDMessageProcessor.java:77)
      	at com.atlassian.servicedesk.squalor.email.ServiceDeskMailFetcherService.runImpl(ServiceDeskMailFetcherService.java:71)
      	at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:261)
      	at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66)
      	at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75)
      	at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53)
      	at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36)
      	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135)
      	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101)
      	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80)
      	at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32)
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              malmeida Marcus Silveira
              Votes:
              3 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: