
    379 S.E.2d 485
    Deborah Forney DUNN, Administratrix of the Estate of Joseph E. Dunn, Jr. v. CONSOLIDATION COAL CO., d/b/a Northern West Virginia Region of Consolidated Coal Co.
    No. 18270.
    Supreme Court of Appeals of West Virginia.
    March 27, 1989.
    
      Samuel P. Kamin, Goldburg & Kamin, Pittsburgh, Pa., and James B. Lees, Jr., Vincent J. King, Hunt & Wilson, Charleston, for Deborah Forney Dunn.
    Robert M. Steptoe, Jr., J. Greg Goody-koontz, and Steptoe & Johnson, Clarksburg, for Consol. Coal Co.
   PER CURIAM:

This is an appeal from a final order of the Circuit Court of Marion County dismissing a civil action with prejudice for failure to state a claim upon which relief may be granted. The appellant argues that the trial court erred in considering matters outside of the pleadings when ruling on the appellee’s motion submitted under Rule 12(b)(6) of the West Virginia Rules of Civil Procedure. We agree; therefore, we reverse.

The appellant, Deborah Forney Dunn, is administratrix of the estate of her late husband, Joseph E. Dunn, Jr. The appel-lee, Consolidated Coal Co., is a Delaware corporation with its principal place of business in Pittsburgh, Pennsylvania. The ap-pellee is authorized to do business in West Virginia and operates Loveridge # 22 mine near Fairview, West Virginia. The decedent, Joseph E. Dunn, Jr., was a resident of Pittsburgh, Pennsylvania, and was employed as a senior design manager with Consolidation Coal Co. Mr. Dunn was permanently assigned to the appellee’s Pittsburgh, Pennsylvania office.

On February 13,1987, the appellant initiated this civil action. The complaint alleged that on February 5, 1986, agents and employees of the appellee observed broken rails in the overhead tripper belt conveyor located at the Loveridge mine. In order to inspect and repair the conveyor, appellee’s employees piled coal beneath the broken rails to provide a platform.

On February 6, 1986, Joseph Dunn was at the Loveridge # 22 mine. While visiting the mine, Dunn accepted an invitation to walk onto the coal pile and inspect the conveyor. When Dunn and four other men walked onto the coal pile, the pile collapsed into a cavern, which had formed underneath, and the five men were buried; all were killed.

The complaint contained two causes of action. The first cause of action alleged that Consolidation Coal Co. was negligent in failing to provide a safe work environment, by failing to inspect and maintain the coal facilities, and by failing to warn of the hazards associated with walking atop a coal pile. The complaint contended that the appellant was a business invitee acting outside the scope of his employment when he walked onto the coal pile; therefore, the appellant’s estate could pursue a negligence action and was not barred from recovery by the Pennsylvania workmen’s compensation laws.

In the alternative, the complaint alleged that if the decedent was acting within the scope of his employment, the appellant was entitled to damages pursuant to W.Va.Code § 23-4-2(b) (1985). Specifically, the corn-plaint asserted: (1) the coal pile was unsafe and presented a high degree of risk and a strong probability of serious injury or death; (2) Consolidation Coal was aware of the high degree of risk and the strong probability of serious injury or death presented by this unsafe working condition; and (3) by condoning this unsafe working condition, Consolidation Coal Co. was in violation of both federal and state law.

Appellee filed a pre-answer motion to dismiss under Rule 12(b)(6) of the West Virginia Rules of Civil Procedure. In its motion, the appellee contended that the appellant’s exclusive remedy was through the Pennsylvania workmen’s compensation law; thus, the complaint failed to state a claim upon which relief could be granted. Attached to their motion was the affidavit of the Executive Vice President of Consolidation Coal Co. Shortly thereafter, a hearing was held, at which appellant’s counsel argued that it was improper to consider matters outside of the pleadings in ruling on the Rule 12(b)(6) motion. If the trial court intended to consider matters outside the pleadings, appellant’s counsel requested a continuance in order to file counter affidavits in opposition. This request was denied.

By an order dated April 10, 1987, the circuit court dismissed the civil action with prejudice. In the order, the trial court stated that it considered “the complaint filed herein, the memoranda submitted by the parties, and the affidavit submitted by Consolidation Coal Company ...” It is from this adverse ruling that the appellant appeals.

As we held in syllabus point 4, in part, of United States Fidelity & Guaranty Co. v. Eades, 150 W.Va. 238, 144 S.E.2d 703 (1965):

Only matters considered in the pleading can be considered on a motion to dismiss under Rule 12(b) R.C.P., and if matters outside the pleading are presented to the court and are not excluded by it, the motion should be treated as one for summary judgment and disposed of under Rule 56 R.C.P. ...

See Mandolidis v. Elkins Industries, Inc., supra; Barker v. Traders Bank, 152 W.Va. 774, 166 S.E.2d 331 (1969). Thus, a motion made under Rule 12(b)(6) of the West Virginia Rules of Civil Procedure goes solely to the sufficiency of the claims as they are presented in the pleadings, and matters outside the pleadings, such as affidavits, may not be used or considered. Cf. syllabus point 3, Toler v. Shelton, 159 W.Va. 476, 223 S.E.2d 429 (1976).

If “... matters outside the pleadings are presented to and not excluded by the court, the [Rule 12(b)(6)] motion shall be treated as one for summary judgment and disposed of as provided in Rule 56, and all parties shall he given reasonable opportunity to present all material made pertinent to such a motion by Rule 56.” W.Va.R.Civ.P. 12(b) (1987) (emphasis added). When the trial court decided to consult matters outside the pleadings, it should have informed the parties and set a schedule for submitting additional affidavits and documents. Under the mandatory phrasing of Rule 12(b)(6), the court’s failure to provide a fair procedure for submission of affidavits or other factual material may constitute reversible error. See Gordon v. National Youth Work Alliance, 675 F.2d 356 (D.C.Cir.1982).

Accordingly, we may sustain the dismissal only if “... it appears beyond doubt that the plaintiff can prove no sets of facts in support of his claim which would entitle him to relief.” Syllabus point 3, in part, Chapman v. Kane Transfer Co., Inc., 160 W.Va. 530, 236 S.E.2d 207 (1977), citing Conley v. Gibson, 355 U.S. 41, 45-46, 78 S.Ct. 99, 102, 2 L.Ed.2d 80, 84 (1957).

All that the pleader is required to do is set forth sufficient information to outline the elements of his claim or to permit inferences to be drawn that these elements exist. The trial court should not dismiss a complaint merely because it doubts that the plaintiff will prevail in the action, and whether the plaintiff can prevail is a matter properly determined on the basis of proof and not merely on the pleadings.

Mandolidis v. Elkins Industries, Inc., 161 W.Va. at 718, 246 S.E.2d at 920, citing Wright & Miller, Federal Practice & Procedure: Civil § 1216 (1969).

We believe the complaint, when considered in the light most favorable to the appellant, states a cause for relief.

For the reasons stated, we reverse the decision of the Circuit Court of Marion County.

Reversed. 
      
      . The overhead tripper belt conveyor is intended to automatically apportion coal from the feeder chutes into various storage bins below.
     
      
      . West Virginia Code § 23-2-lc (1985), provides, in pertinent part:
      If an employee is a resident of a state other than this State and is subject to the terms and provisions of the workmen’s [workers’] compensation law or similar laws of a state other than this State, such employee and his dependents shall not be entitled to the benefits payable under this chapter on account of injury, disease or death in the course of and as a result of employment temporarily within this State, and the rights of such employee and his dependents under the law of such other state shall be the exclusive remedy against the employer on account of such injury, disease or death.
     
      
      .West Virginia Code § 23-4-2(b) provides:
      If injury or death result to any employee from the deliberate intention of his employer to produce such injury or death, the employee, the widow, widower, child or dependent of the employee shall have the privilege to take under this chapter, and shall also have cause of action against the employer, as if this chapter had not been enacted, for any excess of damages over the amount received or receivable under this chapter.
      This action is commonly referred to as a Mandolidis action. Mandolidis v. Elkins Industries, Inc., 161 W.Va. 695, 246 S.E.2d 907 (1978).
     
      
      . Rule 12(b)(6) provides, in pertinent part:
      
        How presented. — Every defense, in law or fact, to a claim for relief in any pleading, whether a claim, counterclaim, crossclaim, or third-party claim, shall be asserted in a responsive pleading thereto if one is required, except that the following defenses may at the option of the pleader be made by a motion: ... (6) failure to state a claim upon which relief can be granted.
     
      
      . In essence, the affidavit asserted: (1) at the time of the accident the decedent was in the course of his employment with Consolidation Coal Co.; (2) Consolidation Coal Co. was a subscriber to and in good standing with the Pennsylvania Workmen’s Compensation system for the benefit of the decedent; (3) the decedent was subject to the terms and provisions of the workmen’s compensation laws of the State of Pennsylvania; and (4) workmen’s compensation benefits have been paid and are currently being paid to the survivors of Joseph E. Dunn, Jr. by Consolidation Coal Co.
     
      
      .In the instant matter, the trial court granted the appellee’s motion to dismiss with prejudice. As we explained in syllabus point 4, in part, of United States Fidelity & Guaranty Co. v. Eades, supra:
      
      ... If a summary judgment is entered under Rule 56 R.C.P. it is a dismissal with prejudice; whereas, a judgment sustaining a motion to dismiss under Rule 12(b) R.C.P. is not a dismissal with prejudice.
     
      
      . Gordon v. National Youth Work Alliance, supra, was interpreting Rule 12(b)(6) of the Federal Rules of Civil Procedure, which is substantially equivalent to Rule 12(b)(6) of the West Virginia Rules of Civil Procedure.
     