Electronic communication between physicians and patients is common but can carry risks to users--both patients and physicians. Little is known about electronic communication between physicians and patients and even less about electronic communication during residency. We studied knowledge and practices before and after a controlled test of a novel curriculum teaching e-mail communication with patients using residents and faculty in 16 family medicine residencies in the United States. Both faculty and residents showed a lack of knowledge of confidentiality and encryption, little familiarity with published guidelines for physician-patient e-mail, and noncompliance with documentation requirements before the curriculum was presented. Posttests revealed a greater improvement in knowledge and appropriate behaviors related to patient-physician e-mail in the intervention group compared to control sites (mean intervention increase is 13 points[t=-4.065, P<.01], mean control increase is 5 points [t=-2.015, P<.05]). An increased uncertainty about comfort with patient e-mail among intervention residents is an interesting result that could be due to heightened awareness of issues but limited time devoted to absorbing the topic. Suggestions for delivering the curriculum are provided.