
677 A.2d 525 (1996)
Richard HAMILTON
v.
A. Caroline GREENLEAF.
Supreme Judicial Court of Maine.
Argued April 3, 1996.
Decided June 5, 1996.
*526 Richard Hamilton, Ogunquit, pro se (orally).
John N. Kelly (orally), Kelly, Remmel & Zimmerman, Portland, for Defendant.
Mark G. Lavoie, Portland, for amicus curiae Maine State Bar Association.
Before WATHEN, C.J., and ROBERTS, GLASSMAN, CLIFFORD, RUDMAN, DANA, and LIPEZ, JJ.
GLASSMAN, Justice.
Richard Hamilton appeals from the judgment entered in the Superior Court (Cumberland County, Bradford, J.) dismissing his complaint against A. Caroline Greenleaf. We vacate the judgment.
By his present complaint, Hamilton, inter alia, claims that Greenleaf has engaged in a conflict of interest by her representation of certain named clients on Hamilton's claims against them. He seeks damages from Greenleaf for the alleged defamation and emotional distress he suffered by reason of her intentional, malicious, reckless or negligent conduct in this representation. Hamilton, inter alia, alleges: Hamilton, an accountant, was represented by the law firm of Ainsworth & Thelin, P.A., in the years 1990 and 1991. Also during that period Hamilton performed accounting services for Ann B. Flannery, Lynette J. Breton, Breton Flannery Woodworks, and Breton Flannery Woodworks, Inc. (collectively "Breton Flannery"). Although Greenleaf, an attorney, did *527 not directly represent Hamilton, she was a member of the law firm of Ainsworth & Thelin from 1989 until 1992 and, while so employed, she represented Breton Flannery. Greenleaf also currently represents, and is the corporate clerk of, Breton Flannery. By its representation of Hamilton during 1990 and 1991, Ainsworth & Thelin gained knowledge of certain matters that could be used against Hamilton or be harmful to him and, because Greenleaf was a member of the firm during this period, this information may be known to her. Because of her involvement with Breton Flannery, Greenleaf should have known that she would be called as a witness in any dispute between Hamilton and Breton Flannery.
On July 5, 1994, Hamilton served on Breton Flannery a small claims statement for monies allegedly owed to Hamilton for accounting services he performed in 1990 and 1991. Hamilton later advised Breton Flannery in writing that he intended to file a complaint in the District Court. By a letter dated August 2, 1994, Greenleaf, as counsel for Breton Flannery, responded in writing to Hamilton's previous communications. The letter, a copy of which was sent to Breton Flannery, chronicled alleged sub-par accounting services on Hamilton's part coupled with a warning that, should Hamilton pursue legal action for the collection of the monies allegedly owed to him, Breton Flannery "may file counterclaims which may equal or exceed [his] claim for damages."
In considering this matter following a hearing on Greenleaf's motion to dismiss the action, the trial court focused entirely on the letter written by Greenleaf to Hamilton. The court dismissed the complaint, stating that it "is based in its entirety on the letter written by [Greenleaf] in defense of her clients' position ... [and she] has an absolute privilege to be free from liability for any statements made by her in the letter to [Hamilton]." From the judgment entered accordingly, Hamilton appeals.
Hamilton contends that the trial court erred by its determinations that the complaint in its entirety is based on Greenleaf's letter to Hamilton, that the contents of the letter are absolutely privileged, and that, accordingly, the action should be dismissed. We agree. The purpose of a complaint in modern notice pleading practice "is to provide defendants with fair notice of the claim against them." Bowen v. Eastman, 645 A.2d 5, 7 (Me.1994). Dismissal of a civil action is proper when the complaint fails "to state a claim upon which relief can be granted." M.R.Civ.P. 12(b)(6). A motion to dismiss pursuant to Rule 12(b)(6) tests the legal sufficiency of the complaint and, on such a challenge, "the material allegations of the complaint must be taken as admitted." McAfee v. Cole, 637 A.2d 463, 465 (Me.1994) (citing Richards v. Soucy, 610 A.2d 268, 270 (Me.1992); Larrabee v. Penobscot Frozen Foods, Inc., 486 A.2d 97, 98 (Me.1984)). In reviewing the trial court's dismissal of an action, "we examine the complaint in the light most favorable to the plaintiff to determine whether it sets forth elements of a cause of action or alleges facts that would entitle the plaintiff to relief pursuant to some legal theory." Id. (citing Larrabee, 486 A.2d at 99). We will uphold a dismissal "only when it appears beyond doubt that a plaintiff is entitled to no relief under any set of facts that he might prove in support of his claim." Hall v. Bd. of Envtl. Protection, 498 A.2d 260, 266 (Me.1985) (citations omitted). The legal sufficiency of a complaint challenged pursuant to M.R.Civ.P. 12(b)(6) is a question of law. Bowen, 645 A.2d at 6-7 (citing Richards, 610 A.2d at 270).
Here, by focusing solely on the letter, the court failed to consider Hamilton's assertion that by her representation of Breton Flannery against him, Greenleaf had acted not just negligently, but had recklessly, maliciously, or intentionally engaged in a conflict of interest, thereby, inter alia, causing him emotional distress. We have held that an attorney's statements in the context of a pleading or judicial proceeding are absolutely privileged, provided that they are relevant to those proceedings. Dineen v. Daughan, 381 A.2d 663, 664-65 (Me.1978). To avail oneself of the privilege, however, the attorney seeking the protection of the privilege must have become involved in the representation *528 in good faith.[1]Id. at 664 (citing Sriberg v. Raymond, 370 Mass. 105, 345 N.E.2d 882, 884 (1976)) (privilege should attach to communication to prospective defendant relating to proceeding contemplated in good faith and under serious consideration). The Maine Bar Rules prohibit a lawyer from commencing "representation adverse to a former client without that client's informed written consent if such new representation is substantially related to the subject matter of the former representation or may involve the use of confidential information obtained through such former representation." M.Bar R. 3.4(d)(1)(i). See also Adam v. Macdonald Page & Co., 644 A.2d 461, 463 (Me.1994) ("Maine's rule has two prongs, either of which requires disqualification."). Nor may an attorney commence representation "if the lawyer knows, or should know, that the lawyer is likely or ought to be called as a witness." M.Bar R. 3.4(g)(1)(i).
Before Hamilton's claims may be finally resolved, the trial court must determine whether there exists a triable issue on Hamilton's conflict of interest claim that, inter alia, may preclude Greenleaf from availing herself of the absolute privilege she seeks. Although Greenleaf may ultimately prevail on some or all of Hamilton's claims pursuant to a motion for a summary judgment, M.R.Civ.P. 56, considering the present posture of the proceedings, we cannot say as a matter of law that it is "beyond doubt that [Hamilton] is entitled to no relief under any set of facts that he might prove in support of his claim." Hall, 498 A.2d at 266.
The entry is:
Judgment vacated. Remanded for further proceedings consistent with the opinion herein.
All concurring.
NOTES
[1]  Because we determine that the complaint gives fair notice of a conflict that may preclude Greenleaf from asserting the privilege, we do not reach Greenleaf's contention that the privilege should apply to attorney communications made prior to the institution of judicial proceedings.
