diff --git a/src/sbbs3/atcodes.cpp b/src/sbbs3/atcodes.cpp
index baf19409e3105a852e5d9608678143075c4f0670..f092eba73d366d4f030f01dc96ce067a3ecf6170 100644
--- a/src/sbbs3/atcodes.cpp
+++ b/src/sbbs3/atcodes.cpp
@@ -1863,6 +1863,14 @@ const char* sbbs_t::atcode(const char* sp, char* str, size_t maxlen, int* pmode,
 			*pmode |= (current_msg->hdr.auxattr & MSG_HFIELDS_UTF8);
 		return(current_msg_to);
 	}
+	if(!strcmp(sp,"MSG_TO_FIRST") && current_msg_to!=NULL) {
+		if(pmode != NULL && current_msg != NULL)
+			*pmode |= (current_msg->hdr.auxattr & MSG_HFIELDS_UTF8);
+		safe_snprintf(str, maxlen, "%s", current_msg_to);
+		if((tp = strchr(str, ' ')) != NULL)
+			*tp = '\0';
+		return str;
+	}
 	if(!strcmp(sp,"MSG_TO_EXT") && current_msg!=NULL) {
 		if(current_msg->to_ext==NULL)
 			return(nulstr);
@@ -1901,6 +1909,15 @@ const char* sbbs_t::atcode(const char* sp, char* str, size_t maxlen, int* pmode,
 			*pmode |= (current_msg->hdr.auxattr & MSG_HFIELDS_UTF8);
 		return(current_msg_from);
 	}
+	if(!strcmp(sp,"MSG_FROM_FIRST") && current_msg != NULL && current_msg_from != NULL) {
+		if(current_msg->hdr.attr&MSG_ANONYMOUS && !SYSOP)
+			safe_snprintf(str, maxlen, "%s", text[Anonymous]);
+		else
+			safe_snprintf(str, maxlen, "%s", current_msg_from);
+		if((tp = strchr(str, ' ')) != NULL)
+			*tp = '\0';
+		return str;
+	}
 	if(!strcmp(sp,"MSG_FROM_EXT") && current_msg!=NULL) {
 		if(!(current_msg->hdr.attr&MSG_ANONYMOUS) || SYSOP)
 			if(current_msg->from_ext!=NULL)