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:
- JDK 1.5.0_06 or later.
- Email to case agent (Download from -http:// wiki.apexdevnet.com /index.php / Members : Email_To_Case )
- Make sure Email to Case is enabled in Salesforce.
- 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:
- email2case.bat (To run Email-to-Case Agent we need to click on this batch file)
Configuring “email2case.txt” :
<configFile> <server1> <url>your.EmailServer.Path</url> <protocol>imap</protocol> <userName>emailtocase@YourEmail.in</userName> <password>YourPassword</password> <interval>1</interval> <inbox>Inbox</inbox> <readbox>Inbox.testNestedProcessing</readbox> <errorbox>Inbox.testNestedError</errorbox> </server1> </configFile>[table “10” not found /]
Configuring “sfdcConfig.txt” :
<configFile> <sfdcLogin> <url>https://www.salesforce.com/services/Soap/u/9.0</url> <userName>SalesforceUserName</userName> <password>SalesforcePassword</password> <loginRefresh>30</loginRefresh> <timeout>600</timeout> </sfdcLogin> <notify> <notifyEmail>jitendraZaa@gmail.com</notifyEmail> <from>email@example.com</from> <host>Email Server Host</host> <port>25</port> <user>firstname.lastname@example.org</user> <password>PasswordofEmail</password> <service>com.sforce.mail.SMTPNotificationAuth</service> </notify> <attachments> <largeAttachmentDirectory>C:\Users\JitendraZaa \Downloads \EmailAgent \Attachments \</largeAttachmentDirectory> <largeAttachmentURLPrefix>file:\C:\Users \ JitendraZaa \Downloads \EmailAgent \ Attachments\</largeAttachmentURLPrefix> <largeAttachmentSize>0.5</largeAttachmentSize> </attachments> <services> <com.sforce.mail.EmailService>C:\Users \JitendraZaa\ Downloads\ EmailAgent\ email2case.txt </com.sforce.mail.EmailService> </services> </configFile>[table “11” not found /]
Large Attachment processing:
Salesforce.com 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.
Youtube Video Tutorial of Email to Case Agent :