function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mark_AbramowitzMark_Abramowitz 

Update: Email-To-Case Agent Code

A new release of the Email-To-Case Agent Code is available and can be found here:
http://www.sforce.com/resources/toolkits-samples.jsp#EmailToCase

The focus of the release was to enhance the Email-To-Case Agent Code to perform retries when the email server or Sforce service are not reachable. In addition, email monitoring with notifications and error codes has been implemented.

The Email-To-Case Agent Code currently includes support for:
--Notifications
--Error Handling
--Logging
--Retries
--Blocking
--Ant build script

The Email-to-Case Agent source code is a sample implementation that pulls emails from multiple email addresses on your mail server and uses the Sforce API to create new cases in Supportforce, or append to an existing case. It currently supports servers with IMAP support. Customers can use the source code to extend the Email Agent beyond these capabilities to meet additional requirements.

This source code is not supported by Salesforce.com and is provided as a sample to accelerate the implementation of Email Management.


Mark Abramowitz
Senior Product Manager, Supportforce
fifedogfifedog
Great, getting now. However do you know if it address the null pointer exception? see thread: http://forums.sforce.com/sforce/board/message?board.id=sforceExplorer&message.id=87
Mark_AbramowitzMark_Abramowitz
I checked out the other post you refer to but dont see any details on a nullpointer error.

Please give me details on the nullpointer error you are referring to.
fifedogfifedog
Sorry seem to of listed the wrong thread . Anywho...

I posted a message about when I forward a message from my outlook client (the forward is an attachment) the agent throws the NullPointer error. (see below)

This is with the latest version that was released on the 20th.

***************** ERROR Log ************************
[Thread-1] INFO com.sforce.mail.GenericClient - >>> mail.fortinet.com:pfife_test:receive()
[Thread-1] INFO com.sforce.mail.GenericClient - processing 1 messages
[Thread-1] ERROR com.sforce.mail.GenericClient - java.lang.NullPointerException
java.lang.NullPointerException
at javax.mail.internet.MimeUtility.decodeText(MimeUtility.java:472)
at com.sforce.mail.ParsedMessage$EmailBody$EmailAttachment.getFileName(ParsedMessage.java:385)
at com.sforce.mail.ParsedMessage$EmailBody$EmailAttachment.(ParsedMessage.java:394)
at com.sforce.mail.ParsedMessage$EmailBody.(ParsedMessage.java:288)
at com.sforce.mail.ParsedMessage.(ParsedMessage.java:55)
at com.sforce.mail.GenericClient.handleMessage(GenericClient.java:490)
at com.sforce.mail.GenericClient.receive(GenericClient.java:437)
at com.sforce.mail.EmailService$EmailWorker.run(EmailService.java:202)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
2005-07-22 08:25:00,271 4156 [Thread-1] INFO com.sforce.mail.GenericClient - <<< mail.fortinet.com:pfife_test:receive()
fifedogfifedog
Marka,
Can you explain what "Blocking" is. Does this mean we can configure the agent to 'block' certian emails?
Mark_AbramowitzMark_Abramowitz
No. Blocking means that only one Email Agent process can be connected to a mailbox at one time. This prevents multiple Email Agent processes from colliding when attempting to poll a mailbox.

Mark Abramowitz
Senior Product Manager, Supportforce
Mark_AbramowitzMark_Abramowitz
thanks for bringing this to my attention. the latest release does not address this null pointer error.

We are going to capture this error in the logs, errorbox and notify the appropriate email address.
fifedogfifedog
Mark,
So are you saying this will ONLY be handled as you out lined or in the future releases of the email to case will this be handled?
rgopalanrgopalan
This will only be handled as i have outlined in the previous post.

We capture this error in the logs, errorbox and notify the appropriate email address.
EzraEzra
Has anyone on this board modified their Agent to UPDATE a case (as opposed to APPEND to it)?
MogyDevMogyDev

Hello,

We found the old email2case program had quite a number of problems and so were very interested to see this new version. We have started testing it on our development account and I must say it is looking much much better.

  • If you send an email with an attachment that is empty, it does not keep processing this and cause all manor of problems. it simply moves it to the error folder and that's it.
  • if you send an image embedded in an email it seems to work fine, in the past we received null pointer problems.
  • if there is a communication problem with one of the servers it will notify the designated address.
  • I have not tried the blocking yet but i will as we had problems with this in the past.

as we continue testing I will update this thread. if you have specifics to test or emails send them to me and we can see what happens.

many thanks

PeterATLPeterATL
I've configured email to case with the appropriate settings for my IMAP, Salesforce and smtp accounts.

The readme didn't indicate to setup folders on the IMAP server.

When I ran the jar, it bailed because the expected folders weren't valid.

So, I created a processed folder named "read" and an error folder named "errors"

When I run the jar, I still get an error:
"The processed folder provided is not valid."

I get the following email notification:

"The processed folder provided is not valid.
read


SFDC Url: https://www.salesforce.com/services/Soap/u/6.0
SFDC User ID:
SFDC Login Refresh: 30
SFDC Timeout: 4

Registered Services:
:@.com:inbox"

What do I have to do to fix this?

(I've removed my specific account and server info, of course)

Message Edited by PeterATL on 12-16-2005 01:25 PM

Message Edited by PeterATL on 12-16-2005 01:26 PM