
666 So.2d 833 (1995)
Deborah POSTON
v.
Rufus R. SMITH, Jr.
2940324.
Court of Civil Appeals of Alabama.
July 21, 1995.
Frank M. Cauthen, Jr., of McElvy & Ford, P.C., Tuscaloosa, for Appellant.
William L. Lee III of Lee & McInish, Dothan, for Appellee.
THIGPEN, Judge.
In August 1994, Deborah Poston (employee) filed a complaint for workers' compensation benefits, alleging that she had sustained an injury or occupational disease (chronic sinusitis) in or about July 1993, while working within the line and scope of her employment with Rufus R. Smith, Jr. (employer), due to her exposure to cigarette smoke in the workplace. The employer filed a motion to dismiss, asserting that the complaint failed to state a claim upon which relief could be granted, and, alternatively, that it affirmatively *834 appeared from the allegations that the relief sought was not covered by Alabama's workers' compensation laws.
Following a hearing, the trial court granted the employer's motion and dismissed the action. The employee filed a post-judgment motion, along with supporting documentation, including a brief and the affidavits of two physicians attesting to their opinions that the employee's chronic sinusitis was caused by, contributed to, or aggravated by, constant exposure to secondhand smoke in the work environment.
Following another hearing, the trial court entered its final order, finding, inter alia, that:
"[Poston] has filed two affidavits from medical doctors to the effect that exposure to second hand smoke contributed to or aggravated a sinusitis condition in [Poston].
"The issue of concern is not whether the second hand cigarette smoke had some detrimental effect to [Poston's] health but whether or not such is compensable under Alabama's Workmen's Compensation Laws. Such is not in the nature of an accident and in order to be considered an `occupational disease' must result from a hazard that was peculiar to the job or profession.
"The Court finds as a matter of law that exposure to second hand smoke is not peculiar to the environment and duties of a law office nor is it related in any way to its function or operation.
"Therefore, the Court denies the Motion to Reconsider the dismissal."
The employee appeals, asserting error in dismissing her complaint as a matter of law, and in denying her post-judgment motion.
At the outset, it is necessary to determine the standard of review applicable in this case. While the parties assert the standard applicable to motions to dismiss and argue the vagaries of whether the granting of the motion to dismiss was proper, it is noteworthy that the trial court considered matters extraneous to the pleadings in making its determination. When a trial court considers matters outside the pleadings on a motion to dismiss, that motion converts into a motion for summary judgment pursuant to Rule 12(b) A.R.Civ.P., "regardless of its denomination and treatment by the trial court." Boles v. Blackstock, 484 So.2d 1077, 1079 (Ala. 1986).
Rule 12(b), A.R.Civ.P., states in pertinent part:
"If, on a motion asserting the defense numbered (6) to dismiss for failure of the pleading to state a claim upon which relief can be granted, matters outside the pleading are presented to and not excluded by the court, the motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, and all parties shall be given reasonable opportunity to present all material made pertinent to such a motion by Rule 56."
Rule 56(c)(2), A.R.Civ.P. states, in pertinent part, that "[t]he motion ... shall be served at least ten (10) days before the time fixed for the hearing."
The law, therefore, is clear that if a motion pursuant to Rule 12(b)(6), A.R.Civ.P., is converted into a motion for summary judgment, both parties must be given "a reasonable opportunity to submit affidavits and other extraneous proofs to avoid a party being taken by surprise through conversion of the motion to dismiss to one for summary judgment." Hales v. First National Bank of Mobile, 380 So.2d 797, 799 (Ala.1980). "The requirements of Rule 56 apply to a converted Rule 12(b)(6) motion." Graveman v. Wind Drift Owners' Association, Inc., 607 So.2d 199, 202 (Ala.1992).
In this case, it appears that neither the parties nor the trial court was aware of the conversion of this matter to a motion for summary judgment. It appears from the record that the trial court held two hearings, one on the employer's motion to dismiss, and another on the employee's post-judgment motion. It appears that at each hearing, arguments of counsel and other matters outside the pleadings, which do not appear of record, were considered by the court. With her post-judgment motion, the employee's brief and her arguments may have been considered by the trial court. "In some instances, *835 briefs and oral arguments of counsel, when submitted to and considered by a trial court in ruling upon a Rule 12(b)(6) motion, have been held sufficient in themselves to be `matters outside the pleadings,' which would convert a Rule 12(b)(6) motion into one for summary judgment." Sims v. Lewis, 374 So.2d 298, 302 (Ala.1979). Additionally, two affidavits by physicians were presented and referred to by the trial court in its order.
This was error prejudicial to both parties, since an opportunity to introduce affidavits and other evidence in opposition to a motion for summary judgment to demonstrate that genuine issues of material fact exist, should be permitted. Conversely, a Rule 12(b)(6) motion to dismiss encompasses only the determination of whether the pleading states a claim upon which relief can be granted, and matters outside the pleadings should never be considered in deciding whether to grant a Rule 12(b)(6) motion. Hales, 380 So.2d 797.
Accordingly, the judgment of the trial court is reversed, and the cause is remanded to assure that the procedural safeguards are provided. On remand, either party may file a motion for summary judgment, and the trial court is free to conduct a proper hearing to afford all parties proper notice and the opportunity to present evidence in compliance with Rule 56, to determine whether any genuine issue of material fact exists in this case. This opinion should not be construed as a determination of whether summary judgment is proper as to either the claim or the defense, but only that both parties were denied the procedural rights afforded them by Rules 12 and 56, A.R.Civ.P. Hales, 380 So.2d 797.
For the foregoing reasons, the judgment of the trial court is due to be, and it is hereby, reversed, and the cause is remanded for further proceedings consistent with this opinion.
REVERSED AND REMANDED WITH INSTRUCTIONS.
ROBERTSON, P.J., and YATES, MONROE, and CRAWLEY, JJ., concur.
