<PAGE>
EXHIBIT 5.1
OPINION OF PILLSBURY MADISON & SUTRO LLP
June __, 2000
eGain Communications Corporation
455 W. Maude Avenue
Sunnyvale, CA 94806
RE: REGISTRATION STATEMENT ON FORM S-4
Ladies and Gentlemen:
We are acting as counsel for eGain Communications Corporation, a Delaware
corporation (the "Company"), in connection with the registration under the
Securities Act of 1933, as amended, of the 5,961,735 shares of common stock, par
value $0.001 per share, of the Company (the "Shares"), to be delivered to
holders of common stock, par value $0.01 per share, of Inference Corporation, a
Delaware corporation ("Inference"), pursuant to an Agreement and Plan of Merger,
dated as of March 16, 2000 (the "Merger Agreement"), by and between the Company,
Inference and Intrepid Acquisition Corp. In this regard we have participated in
the preparation of a Registration Statement on Form S-4 relating to such shares
of Common Stock (the "Registration Statement").
We are of the opinion that the Shares have been duly authorized and, when
delivered pursuant to the terms of the Merger Agreement, will be legally issued,
fully paid and nonassessable.
We hereby consent to the filing of this opinion as Exhibit 5.1 to the
Registration Statement and to the use of our name under the caption "Legal
Matters" in the Registration Statement and in the Proxy Statement/Prospectus
included therein.
Very truly yours,