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
saraisarai 

Email2Case error message

I'm not a developer, but I was able to use the Email2Case sample code by running it on Windows in a batch file. However, we recently started using Google Apps as our email host, and since then I have been unable to get the Email2Case app to work. I'm hoping someone can tell me what obvious error I have made.

Error: No configuration value has been provided for the notification service UserID.

My best guess is that the app is complaining I haven't provided a username and password for SMTP authentication. But in the recent past I have been able to send email through this mail server without authenticating. It's a Speakeasy.net mail server and the machine is on a Speakeasy network.

In case it helps here are my config files:

<configFile>
    <sfdcLogin>
        <url>https://www.salesforce.com/services/Soap/u/7.0</url>
        <userName>zac@sarai.org</userName>
        <password>xxxxxxx</password>
        <loginRefresh>30</loginRefresh>
        <timeout>600</timeout>
    </sfdcLogin>
    <notify>
    <notifyEmail>support@sarai.org</notifyEmail>
        <from>support@sarai.org</from>
        <host>mail.speakeasy.net</host>
    <port>25</port>
        <service>com.sforce.mail.SMTPNotification</service>
    </notify>
    <attachments>
        <largeAttachmentDirectory>C:\Program Files\Salesforce.com\EmailAgent\Attachments</largeAttachmentDirectory>
        <largeAttachmentURLPrefix>file:C:\Documents and Settings\Administrator\Desktop\EmailAgent\Attachments</largeAttachmentURLPrefix>
        <largeAttachmentSize>0.5</largeAttachmentSize>
    </attachments>
    <services>
        <com.sforce.mail.EmailService>C:\Program Files\Salesforce.com\EmailAgent\email2case.txt</com.sforce.mail.EmailService>
    </services>
</configFile>

<configFile>
    <server1>
        <url>imap.gmail.com</url>
    <port>993</port>
        <protocol>imap</protocol>
        <userName>support@sarai.org</userName>
        <password>xxxxxxxx</password>
        <interval>2</interval>
        <inbox>INBOX</inbox>
        <readbox>INBOX/Processed</readbox>
        <errorbox>INBOX/Error</errorbox>
    </server1>
</configFile>

Thanks in advance for any assistance you can offer.
saraisarai
Salesforce.com technical support correctly pointed out that if I'm using port 993 then the corresponding protocol should be IMAPS, not IMAP. I made that change but the error message about the notification service userID persisted.

Any thoughts are much appreciated.

Thanks,

Zac
saraisarai
I was eventually able to resolve this issue. It seems that once I had properly configured the email settings with the path to the IMAP folders for processed and error messages, I ceased to get the error about the notification service.

BTW--if anyone else tries to use Google Apps with the Email2Case application, the correct syntax for the IMAP mailboxes is: [Gmail]/mailbox. Except for the inbox, which seems to work just fine as "Inbox".
IanSampsonIanSampson
For future reference, I came across this really useful posting:

Using Email2Case with Google’s Gmail

http://salesforce.phollaio.com/2008/02/22/configure_email2case_to_work_with_googles_gmail/
GoForceGoGoForceGo

One thing to remember is that if you are using an SMTP server (such as gmail) for error notification that  uses TLS or SSL with authentication, you will have to modify the standard SFDC email2case code. For gmail to work, I had to set the port as 587 and modify the code as follows.

 

 

<notify>
<notifyEmail>xxxxx</notifyEmail>
<from>xxxx</from>
<host>smtp.gmail.com</host>
<port>587</port>
<user>xxx</user>
<password>xxxx</password>
<service>com.sforce.mail.SMTPNotificationAuth</service>
</notify>

 

 

 

 In SMTPNotificationAuth, I had to enable starttls.

 

 

@Override
protected void addProperties(Properties p) {
p.put("mail.smtp.auth", "true");
p.put("mail.smtp.starttls.enable", "true");
//p.put("mail.smtp.ssl.enable", "true");
}

 

 

 

 If your SMTP server uses SSL instead, you might need to enable that property.  I thought gmail might work at port 465 with ssl enabled, but it didn't. 

 

 

 

 

 

 

Message Edited by GoForceGo on 04-02-2009 07:08 AM