
529 A.2d 1357 (1987)
Cindy ROBINSON
v.
WASHINGTON COUNTY et al.
Supreme Judicial Court of Maine.
Argued May 6, 1987.
Decided August 21, 1987.
*1358 Daniel LaCasse, (orally), Brown, Tibbetts, Churchill & LaCasse, Calais, for plaintiff.
Carletta M. Bassano, (orally), Asst. Dist. Atty., Machias, for defendants.
Before McKUSICK, C.J., and NICHOLS, ROBERTS,[*] WATHEN, GLASSMAN, SCOLNIK and CLIFFORD, JJ.
CLIFFORD, Justice.
Cindy Robinson appeals from a judgment of the Superior Court, Washington County, granting the defendants' motion to dismiss her complaint. She alleges that, as a pretrial detainee incarcerated first in the Washington County jail and later in the Franklin County jail, she suffered a miscarriage due to the grossly negligent and intentional conduct of Franklin County doctors and officials. Robinson sought damages *1359 from both Washington County and Harold Prescott, the Sheriff of Washington County, for personal injuries, the intentional infliction of emotional distress, the wrongful death of her unborn child and for violating her civil rights. Although we find that the Superior Court properly dismissed Robinson's wrongful death and civil rights claims, we vacate the judgment with respect to the remaining two counts of her complaint.
Robinson's complaint alleges the following facts. Robinson, a resident of Calais in Washington County, was arrested pursuant to a Governor's Warrant for extradition to Texas in March, 1985. She was first incarcerated in the Washington County jail and later transferred to the Franklin County jail by the Washington County Sheriff. Robinson told both Washington County officials and Franklin County officials of her pregnancy. She contends, however, that she was examined by Franklin County doctors who ignored her physical symptoms of pregnancy, determined that she was not pregnant and refused to allow her to contact her primary physician to substantiate her pregnancy or to permit her to seek outside independent medical advice. As a direct result of the gross negligence of Franklin County doctors, officials and agents, including the failure to provide her with adequate living quarters and clothing, improperly diagnosing her condition and providing inadequate medical care, she allegedly suffered a miscarriage as well as personal injury, pain and suffering. Robinson contends that she was in the defendants' "official custody" at the time of her miscarriage, and therefore "any negligence on the part of Franklin County officials, agents and doctors must be attributable to said Sheriff and Washington County."
Robinson's original complaint sought damages for personal injuries (Count I), the intentional infliction of emotional distress (Count II) and wrongful death (Count III). Before a responsive pleading was filed, she moved to amend her complaint to add a Count IV, seeking damages for an alleged violation of her civil rights under 42 U.S.C. § 1983, together with reasonable attorney fees pursuant to 42 U.S.C. § 1988. The defendants moved to dismiss the complaint on the grounds that Robinson failed to comply with the notice provisions of the Maine Tort Claims Act, that the defendants were immune from liability under that Act, and that the complaint failed to state a claim upon which relief could be granted pursuant to M.R. Civ. P. 12(b)(6). The Superior Court granted the defendants' motion for the reason that "the Plaintiff was a prisoner in Franklin County when the alleged acts were committed and not a prisoner in Washington County."

I.
In reviewing the dismissal of a complaint under Rule 12(b)(6), we assume that the factual allegations in the complaint are true, although we are not bound to accept the complaint's legal conclusions. See Larrabee v. Penobscot Frozen Foods, 486 A.2d 97, 98 (Me.1984). We examine the complaint in the light most favorable to the plaintiff to ascertain whether the complaint alleges the elements of a cause of action or facts entitling the plaintiff to relief on some legal theory. Dismissal is only appropriate where it appears beyond doubt that the plaintiff is not entitled to relief under any facts she might prove in support of her claim. Id. at 99; MacKerron v. Madura, 445 A.2d 680, 681-82 (Me.1982).
We first discuss whether the plaintiff may bring this action under the Maine Tort Claims Act, 14 M.R.S.A. §§ 8101-8118 (1980 & Supp.1986). As a preliminary matter, the plaintiff must comply with the notice provision pursuant to section 8107. That provision provides in pertinent part that
[n]otice of claims against any political subdivision or an employee thereof shall be addressed to and filed with one of the persons upon whom a summons and complaint could be served under the Maine Rules of Civil Procedure, Rule 4, in a civil action against a political subdivision.
14 M.R.S.A. § 8107(3)(B) (1980). M.R. Civ.P. 4(d)(4) provides that "[p]ersonal service within the state shall be made ... [u]pon a county, by delivering a copy of the *1360 summons and of the complaint to one of the county commissioners or their clerk or the county treasurer." The defendants contend that Robinson failed to comply with these notice provisions. We find that there has been substantial compliance.
On September 3, 1985, the plaintiff mailed a letter to Sheriff Prescott at the Washington County Courthouse in Machias. The letter purported to notify Washington County of her intention "to bring a civil action against the County of Washington and/or their officers, employees and agents."[1] The plaintiff's letter clearly does not comply with the literal requirement of M.R. Civ. P. 4(d)(4), requiring delivery of the complaint and summons "to one of the county commissioners or their clerk or the county treasurer." However, the notice requirements of the Maine Tort Claims Act require substantial rather than literal compliance. See 14 M.R.S.A. § 8107(4) (1980).[2]
In Faucher v. City of Auburn, 465 A.2d 1120 (Me.1983), we noted that the purpose of the requirement in section 8107(4) that notice be given in accordance with M.R. Civ. P. 4 "is to assure that the notice will be received by an official having authority to deal with plaintiff's claim or that the official receiving the notice is one charged with the duty of transmitting the notice to the proper officials." Id. at 1123. The plaintiff's failure to notify the governmental entities listed in Rule 4(d)(4) is not so fundamental as to require that the notice be held invalid. In this case, the written notice was delivered directly to one of the litigants, namely, Sheriff Prescott, the chief law enforcement officer for Washington County. See 30 M.R.S.A. § 1001(1) (1980). No prejudice to any of the defendants has been demonstrated at this stage of the proceedings. We therefore conclude that without such a showing of prejudice the plaintiff's letter adequately complies with the notice provision of the Tort Claims Act.
We next consider whether the plaintiff may maintain this action under any of the substantive provisions of the Tort Claims Act. The Act renders all governmental entities immune from suit on all tort claims seeking recovery of damages "[e]xcept as otherwise expressly provided by statute ..." 14 M.R.S.A. § 8103(1) (1980). The Act sets forth several limited exceptions that are to be narrowly construed. Rivard v. City of Lewiston, 516 A.2d 555, 555-56 (Me.1986); Clockedile v. State Dep't of Transp., 437 A.2d 187, 189 (Me.1981). Although the alleged conduct does not appear to fall within any of the exceptions to immunity under section 8104,[3] governmental immunity is an affirmative *1361 defense, to be pleaded under M.R. Civ. P. 8(c), and cannot be invoked as a ground for dismissal of a complaint unless "the complaint contains within its four corners allegations of sufficient facts to show the existence and applicability of the immunity." MacKerron, 445 A.2d at 682. Plaintiff contends, as she did in Superior Court, that defendants are insured against liability pursuant to 14 M.R.S.A. § 8116[4] and that she may maintain this action, notwithstanding that the defendants' alleged acts or failures to act fall outside the scope of the exceptions to immunity under the Maine Tort Claims Act. See Burns v. City of Augusta, 522 A.2d 361, 362 (Me.1987). Because there is no indication in the complaint of the absence of insurance, and no such assertion in the motion to dismiss, so as to allow the court to treat the motion as one for summary judgment, see M.R. Civ. P. 12(c) & 56, the motion to dismiss on the ground of immunity under the Tort Claims Act was improperly and prematurely granted. MacKerron, 445 A.2d at 682.

II.
We next address the appropriateness of the Superior Court's dismissal of this case for failure to state a claim upon which relief could be granted based on the fact that Robinson was incarcerated in Franklin County, where the alleged misconduct was committed, rather than in Washington County. Robinson contends that an analysis of the statutory scheme regarding county jails and jailers, 30 M.R.S.A. §§ 1701-1858 (Supp.1986), reveals an intent on the part of the legislature to require the county in whose custody a prisoner is placed to assume full responsibility for the prisoner's welfare and living conditions, notwithstanding the prisoner's subsequent transfer to a jail in another county. The defendants contend that only the governmental entity that has actual physical custody of an inmate is responsible for providing that inmate with adequate necessities, such as food, clothing, heat and reasonable medical care. Because the plaintiff was in the physical custody of Franklin County at the time the cause of action accrued, the defendants assert that Washington County officials cannot be held accountable for the conduct of Franklin County officials, and that this court is not bound to accept the plaintiff's legal conclusion that Washington County officials retained responsibility for the plaintiff's welfare as her "legal custodians."
The issue whether Washington County officials retained "legal custody" of the plaintiff is not solely one of law, however, but rather a mixed question of law and fact. The applicable statute provides that "[t]he sheriff has the custody and charge of the jail in his county and of all prisoners therein and shall keep it himself, or by *1362 his deputy as jailer, master or keeper." 30 M.R.S.A. § 1701 (Supp.1986) (emphasis added). Although the transferor jail is required to pay the cost of transfer of the prisoner as well as the cost of the prisoner's support in the receiving jail, see 30 M.R.S.A. § 1760(1) & (2) (Supp.1986), the statute is silent regarding whether, and under what circumstances, a sheriff of one county may be responsible for the welfare of a prisoner transferred to another county. Such transfers may be made, for example, because of overcrowding, because the transferee county has better facilities for women, because of a change of venue with respect to a pretrial detainee, or merely for the sake of convenience. Although we express no opinion as to whether Washington County and its sheriff may be held liable for personal injuries allegedly sustained by the plaintiff while in the Franklin County jail, we think that the Superior Court erred in failing to allow the plaintiff an opportunity to prove that Washington County retained legal custody of the plaintiff to the extent that that county could be held liable for her injuries under a theory of vicarious liability.

A.
Count I of the complaint sufficiently alleges the necessary elements of a cause of action for negligence. See Macomber v. Dillman, 505 A.2d 810, 812 (Me.1986). Robinson should have been permitted the opportunity to demonstrate Washington County's liability on a vicarious liability theory. See, e.g., Restatement (Second) of Agency § 214 (1958).[5] The court's dismissal of Count I of the complaint was therefore error.

B.
Similarly, Count II of the complaint sufficiently avers the necessary elements of a cause of action for the intentional infliction of emotional distress. Rowe v. Bennett, 514 A.2d 802, 806 n. 3 (Me.1986); Vicnire v. Ford Motor Credit Co., 401 A.2d 148, 154 (Me.1979). See, e.g., Restatement (Second) of Agency § 212 (1958);[6]Restatement (Second) of Torts § 877 (1979).[7] The Superior Court's dismissal of Count II therefore also must be viewed as premature.

C.
Count III of the complaint does not sufficiently state a cause of action for wrongful death. Wrongful death actions under the Maine Tort Claims Act are to be brought by the personal representative(s) of the deceased person in the same manner provided for similar actions under 18-A M.R.S.A. § 2-804 (1981 & Supp.1986). See 14 M.R.S.A. § 8104(5) (Supp.1986).[8] Even assuming that the death of the plaintiff's unborn fetus constitutes the death of a "person" within the meaning of section *1363 8104(5),[9] the action in this case was not brought by the personal representative of the deceased person. The Superior Court therefore correctly dismissed Count III of the complaint.

D.
Finally, we conclude that Count IV of the amended complaint does not sufficiently aver the elements of a cause of action under 42 U.S.C. § 1983.[10] In order to establish a claim under section 1983, the plaintiff must show that the alleged misconduct was committed by persons acting under color of state law, and that their conduct resulted in a federal constitutional or statutory violation. See, e.g., Jackson v. Inhabitants of Town of Searsport, 456 A.2d 852, 856 (Me.1983), cert. denied sub nom. Jackson v. Handley, 464 U.S. 825, 104 S.Ct. 95, 78 L.Ed.2d 101 (1983). Here, Count IV alleges that the defendants acted under color of state law, see 30 M.R.S.A. § 1701 (Supp.1986), and that the plaintiff, a pretrial detainee, suffered intentionally inflicted misconduct resulting in a deprivation of her right to substantive due process under the fourteenth amendment to the United States Constitution.[11]
Nevertheless, the plaintiff does not allege that Washington County and Sheriff Prescott were directly responsible for the alleged federal constitutional violation, but only that they are responsible in their capacity as "legal custodians" of the plaintiff. As such, Count IV predicates her section 1983 claim on a theory of respondeat superior. The United States Supreme Court has made clear, however, that section 1983 will not support a claim based on a respondeat superior theory of liability. See Monell v. Dep't of Social Servs. of the City of New York, 436 U.S. 658, 691, 98 S.Ct. 2018, 2036, 56 L.Ed.2d 611 (1978); Polk County v. Dodson, 454 U.S. 312, 325, 102 S.Ct. 445, 453, 70 L.Ed.2d 509 (1981); see also Kibbe v. City of Springfield, 777 F.2d 801, 803 (1st Cir.1985), cert. granted, ___ U.S. ___, 106 S.Ct. 1374, 89 L.Ed.2d 600 (1986), writ dismissed as improvidently granted, ___ U.S. ___, 107 S.Ct. 1114, 94 L.Ed.2d 293 (1987). We therefore conclude that the plaintiff has failed to establish a sufficient claim under section 1983.
For the foregoing reasons, we conclude that, viewing the complaint in the light most favorable to the plaintiff, the plaintiff's complaint has adequately alleged the elements of the causes of action under Counts I and II, but does not sufficiently state the elements of the causes of action or aver facts that could entitle her to relief under Counts III and IV.
*1364 Accordingly, the entry is:
Order dismissing Counts III and IV of plaintiff's complaint affirmed.
Order dismissing Counts I and II of plaintiff's complaint vacated. Remanded to the Superior Court for further proceedings consistent with the opinion herein.
All concurring.
NOTES
[*]  Roberts, J., sat at oral argument and participated in the initial conference, but participated no further.
[1]  A copy of the letter was appended to the complaint and it could be appropriately considered on a motion to dismiss. The letter also asserted that the "[w]rongful death occasioned by the imprisonment of the claimant occurred on or about April 16th, 1985." The letter was therefore filed within the 180-day filing limit of 14 M.R.S.A. § 8107(1) (1980), and also contains the information specified in section 8107(1)(A) through (E).
[2]  Section 8107(4) provides in pertinent part:

No claim or action shall be commenced against a governmental entity or employee in the Superior Court unless the foregoing notice provisions are substantially complied with. A claim filed under this section shall not be held invalid or insufficient by reason of an inaccuracy in stating the time, place, nature or cause of the claim, or otherwise, unless it is shown that the governmental entity was in fact prejudiced thereby.
[3]  14 M.R.S.A. § 8104 (1980 & Supp.1986) provides in pertinent part:

A governmental entity shall be liable for its negligent acts or omissions causing property damage, bodily injury or death in the following instances:
1. In its ownership, maintenance or use of any:
A. Motor vehicle, as defined in Title 29, section 1, subsection 7;
B. Special mobile equipment, as defined in Title 29, section 1, subsection 14;
C. Trailers, as defined in Title 29, section 1, subsection 18;
D. Aircraft, as defined in Title 6, section 3, subsection 5;
E. Watercraft, as defined in Title 12, section 2061, subsection 17;
F. Snowmobiles, as defined in Title 12, section 1971, subsection 3; and
G. Other machinery or equipment, whether mobile or stationary.
The provisions of this subsection do not apply to the sales of motor vehicles and equipment at auction by a governmental entity;
2. In the construction, operation, or maintenance of any public building or the appurtenances thereto, except as provided in section 8103, subsection 2, paragraphs F, H and I;
3. In the sudden and accidental discharge, dispersal, release or escape of smoke, vapors, soot, fumes, acids, alkalines, toxic chemicals, liquids or gases, waste materials or other irritants, contaminants or pollutants into or upon land, the atmosphere or any water course or body of water; and
4. Arising out of and occurring during the performance of construction, street cleaning or repair operations on any highway, town way, sidewalk, parking area, causeway, bridge, airport runway or taxiway, including appurtenances necessary for the control of such ways including but not limited to street signs, traffic lights, parking meters and guardrails.
[4]  Section 8116 provides in pertinent part:

The legislative or executive body or any department of the State or any political subdivision may procure insurance against liability for any claim against it or its employees under this chapter and including any activity not described in this chapter, but for which immunity is waived by another act. If the insurance provides protection in excess of the limit of liability imposed by section 8105, then the limits provided in the insurance policy shall replace the limit imposed by section 8105. If the insurance provides coverage in areas where the governmental entity is immune, the governmental entity shall be liable in those substantive areas but only to the limits of the insurance coverage.
14 M.R.S.A. § 8116 (1980). Although section 8116 was amended by P.L. 1985, ch. 599, § 3 (effective March 25, 1986) and by P.L. 1985, ch. 713, §§ 1, 2 (effective July 16, 1986), see 14 M.R.S.A. § 8116 (Supp.1986), the above version of section 8116 was in effect on the date the alleged cause of action accrued, i.e., on or about April 16, 1985, the asserted date of the miscarriage.
[5]  Section 214 (Failure of Principal to Perform Non-delegable Duty) provides:

A master or other principal who is under a duty to provide protection for or to have care used to protect others or their property and who confides the performance of such duty to a servant or other person is subject to liability to such others for harm caused to them by the failure of such agent to perform the duty.
[6]  Section 212 (Principal Intends Conduct or Consequences) provides:

A person is subject to liability for the consequences of another's conduct which results from his directions as he would be for his own personal conduct if, with knowledge of the conditions, he intends the conduct, or if he intends its consequences, unless the one directing or the one acting has a privilege or immunity not available to the other.
[7]  Section 877 (Directing or Permitting Conduct of Another) provides in pertinent part:

For harm resulting to a third person from the tortious conduct of another, one is subject to liability if he
(a) orders or induces the conduct, if he knows or should know of circumstances that would make the conduct tortious if it were his own....
[8]  Section 8104(5) provides:

Wrongful death action. Actions for the death of a person brought by the personal representatives of the deceased person shall be brought in the same manner that is provided for similar actions in Title 18-A, section 2-804, and amounts recovered shall be disposed of as required in that section; provided that the limitations of section 8105 shall apply.
[9]  Although we have never decided this issue, we note that as of last year, thirty-three jurisdictions have permitted wrongful death actions to be maintained for the death of a viable unborn child, whereas ten jurisdictions have not. See In re Cert. of Question of Law from U.S. Dist. Ct., 387 N.W.2d 42, 44 nn. 2 & 3 (S.D.1986); see also Note, Prenatal InjuriesActions for Wrongful DeathDamages, 18 Me.L.Rev. 105 (1966).
[10]  Because the plaintiff sought to amend her complaint before a responsive pleading was served she was entitled to amend the complaint "once as a matter of course" under M.R. Civ. P. 15(a), notwithstanding the fact that the Superior Court made no mention of Count IV in granting the defendants' motion to dismiss.

Section 1983 provides:
Every person who, under color of any statute, ordinance, regulation, custom, or usage, of any State or Territory or the District of Columbia, subjects, or causes to be subjected, any citizen of the United States or other person within the jurisdiction thereof to the deprivation of any rights, privileges, or immunities secured by the Constitution and laws, shall be liable to the party injured in any action at law, suit in equity, or other proper proceeding for redress. For the purposes of this section, any Act of Congress applicable exclusively to the District of Columbia shall be considered to be a statute of the District of Columbia.
[11]  See City of Revere v. Massachusetts Gen. Hosp., 463 U.S. 239, 243-44, 103 S.Ct. 2979, 2982-83, 77 L.Ed.2d 605 (1983); Bell v. Wolfish, 441 U.S. 520, 535 n. 16, 99 S.Ct. 1861, 1872 n. 16, 60 L.Ed.2d 447 (1979); Ingraham v. Wright, 430 U.S. 651, 671-72 n. 40, 97 S.Ct. 1401, 1412-13 n. 40, 51 L.Ed.2d 711 (1977); Madden v. City of Meriden, 602 F.Supp. 1160, 1163-64 (D.Conn. 1985); Miga v. City of Holyoke, 398 Mass. 343, 497 N.E.2d 1, 5-6 (1986); Brewer v. Perrin, 132 Mich.App. 520, 349 N.W.2d 198, 202-03 & n. 3 (1984); see also Estelle v. Gamble, 429 U.S. 97, 104, 97 S.Ct. 285, 291, 50 L.Ed.2d 251 (1976); Annotation, Civil Liability of Sheriff or Other Officer Charged with Keeping Jail or Prison for Death or Injury of Prisoner, 14 A.L.R.2d 353 (Later Case Service, 1973 & Supp.1986).
