diff --git a/src/sbbs3/email.cpp b/src/sbbs3/email.cpp
index f039ecb5d632ca16d911cfdcd7e5cb736dbfca0e..a44f79d254a931ce96e26a63cfdccb8e1a1fde8e 100644
--- a/src/sbbs3/email.cpp
+++ b/src/sbbs3/email.cpp
@@ -226,8 +226,7 @@ bool sbbs_t::email(int usernumber, const char *top, const char *subj, long mode)
 		offset=smb_allocdat(&smb,length,1);
 	smb_close_da(&smb);
 
-	if((file=open(msgpath,O_RDONLY|O_BINARY))==-1
-		|| (instream=fdopen(file,"rb"))==NULL) {
+	if((instream=fnopen(&file,msgpath,O_RDONLY|O_BINARY))==NULL) {
 		smb_freemsgdat(&smb,offset,length,1);
 		smb_unlocksmbhdr(&smb);
 		smb_close(&smb);