Working with Email to Case Agent in Salesforce

I have searched web for proper “Email to Case” agent tutorial but didn’t find enough information so decided to write my own one. Many of you already knows that we have “On – Demand” email to case, so what is need of this Agent? However there are existing client which are already using this toolkit and that why sometimes they need support for it.

Why Email to case Agent ?

  • Email to case agent is installed on your local/Server System. It fetches message from your email Server (Email address dedicated to Email to Case), Process it and creates Case records inside Salesforce.
  • As we know that there is limit of attachment size in Case, so using this Agent we can save that attachment on Local / Server hard drive.

Pre-requisite for Email to case Agent:

  1. JDK 1.5.0_06 or later.
  2. Email to case agent (Download from -http:// /index.php / Members : Email_To_Case )
  3. Make sure Email to Case is enabled in Salesforce.
  4. One Email Account which supports IMAP Protocol.

Now extract, Email to case agent downloaded from above URL.

In folder “EmailAgent” you will find below important 3 files:

  1. email2case.bat (To run Email-to-Case Agent we need to click on this batch file)
  2. email2case.txt
  3. sfdcConfig.txt

Configuring “email2case.txt” :

[table “10” not found /]

Configuring “sfdcConfig.txt” :

        <host>Email Server Host</host>
        <largeAttachmentDirectory>C:\Users\JitendraZaa \Downloads \EmailAgent \Attachments \</largeAttachmentDirectory>
        <largeAttachmentURLPrefix>file:\C:\Users \ JitendraZaa \Downloads \EmailAgent \ Attachments\</largeAttachmentURLPrefix>
        <com.sforce.mail.EmailService>C:\Users  \JitendraZaa\ Downloads\ EmailAgent\ email2case.txt </com.sforce.mail.EmailService>
[table “11” not found /]

Large Attachment processing: has a limit on the size of attachments for any single case. When an attachment exceeds this limit, the creation of a case for the email fails and an error is generated. To prevent this from happening, and to manage the storage of large attachments, the files can be stripped from the email they are attached to, and stored on a file system that you specify. Here are the settings that you must configure to activate this optional feature.

[table “12” not found /]
Email To Case Agent Running Mode

Email To Case Agent Running Mode

Youtube Video Tutorial of Email to Case Agent :

This entry was posted in Salesforce and tagged on by .

About Jitendra

Sr. Consultant at Cognizant Technology Solutions. Have more than 7 years of experience in technologies and frameworks like Salesforce, Node.Js, JAVA, PHP, JSP, Struts, Hibernate, C#, ASP.NET, SQL Server. Also many javaScript libraries like AngularJs, JQuery, JQuery Mobile, BootStrap. Connect : Linked In

Related posts

  • Pingback: Troubleshooting of common problems in Email to Case | Shiva Blog

  • Hariharasuthan

    Brilliant Job G2. Kudos to you

    • JitendraZaa

      Thanks Hari

  • hello

    hi: thankyou for tutorial. i wanted to double check, if this method does not require any forward of emails (as the newer functionality, On Demand Email to Case, does require the company to forward all the emails to thankyou.

    • JitendraZaa

      This method requires dedicated email box. Like in above example my email address will be used to fetch all emails.
      In your case it may be

      • siva

        y email to case functionally is not working for forward masages

  • Rajnish

    Bro ..Could you please tell me the difference between On demand Email to Case and normal Email to Case?

    • sudha

      how to represent Email server path

      • JitendraZaa

        There is user, password and port tag in configuration. You have to represent there….

        • sudha

          yes i know it.but i m asking what to represent over there.Actually I dont have email server.How to create email server and how manage this?

          • JitendraZaa

            You will need to buy it from domain provider like go daddy. Or you can use free emails like gmail and yahoo. You can Google on information about accessing email of yahoo and gmail via coding, or client.

    • JitendraZaa

      On demand mean you don’t have to install anything. Out of the box functionality provided by Salesforce.

  • Abhishek Dey

    Hi Jithendra.. I am not able to download email agent from the URL mentioned in your blog. Please let me know if you have any updated URL

  • arwa

    hii can i restrict certain email id from creating case through email to case as in the junk emails should not be automatically created into cases

  • lfgordon

    Hello – this is an excellent tutorial. I helped me understand a lot. I need to help someone that has their email hosted by Google/Gmail with their own domain name.
    Do you know how to ‘install’ the java agent in that environment? I would also love a tutorial on how to get the large attachments stored in Google Drive or somewhere outside of Salesforce.

    Thank you again