July 13, 2000 eGain Communications Corporation 455 W. Maude Avenue Sunnyvale, CA 94086 Re: Registration Statement on Form S-8 Ladies and Gentlemen: With reference to the Registration Statement on Form S-8 to be filed by eGain Communications Corporation, a Delaware corporation (the "Company"), with the Securities and Exchange Commission under the Securities Act of 1933, relating to 1,609,525 shares of the common stock of the Company pursuant to the Amended and Restated Inference Corporation 1993 Stock Option Plan, Inference Corporation 1998 Non-Management Stock Option Plan, and Inference Corporation 1998 New Hire Stock Option Plan, Inference Corporation Charles W. Jepson Stock Option Plan, Inference Corporation Private Placement Stock Option Plan and Inference Corporation Fourth Amended and Restated Incentive Stock Option Plan and Nonqualified Stock Option Plan (together the "Plans"), it is our opinion that such shares, when issued and sold in accordance with the Plans, will be legally issued, fully paid and nonassessable. We hereby consent to the filing of this opinion with the Securities and Exchange Commission as Exhibit 5.1 to the Registration Statement. Very truly yours, PILLSBURY MADISON & SUTRO LLP E-12300