Hi. I am designing a portal and looking to pull emails from the Zimbra server to display to users on their dashboard.
When a user clicks an email link, he is logged in automatically to the Zimbra Web app using the Zimbra Preauth.
This works perfectly on my development machine. However, when tested on the live server, I get an error message:
HTTP ERROR 500
Problem accessing /service/preauth. Reason:
For input string: "1.365843887E 12"
I suspect the error is due to the timestamp generated (I was able to recreate the problem by assigning "wrong" times
to the timestamp on my development machine). However, I can't think why it should work on the localhost but not on the live server.
By the way, the portal and the zimbra are on the same domain, if that helps.
$PREAUTH_KEY = [My Key];
$WEB_MAIL_PREAUTH_URL = "http://myserver/service/preauth";
$preauthToken = hash_hmac("sha1",$email."|name|0|".$timestamp,$PREAUTH_KEY);
$preauthURL = $WEB_MAIL_PREAUTH_URL."?account=".$email."&by=name×tamp=".$timestamp."&expires=0&preauth=".$preauthToken."&redirectURL=/zimbra/h/";