+
+ return(returned_string);
+}
+
+
+
+// Compose a new mail message (called by the Reply button here, or by the dispatcher in views.js)
+//
+// references list of references, be sure to use this in a reply
+// quoted_msgnum if a reply, the msgid of the most recent message in the chain, the one to which we are replying
+// (set to 0 if this is not a reply)
+// m_to an ARRAY of zero or more recipients to pre-insert into the To: field
+// m_cc an ARRAY of zero or more recipients to pre-insert into the Cc: field
+// m_subject a string to pre-insert into the Subject: field
+//
+function mail_compose(references, quoted_msgnum, m_to, m_cc, m_subject) {
+
+ let is_reply = 0;
+ let is_quoted = (quoted_msgnum > 0) ? true : false ;
+ let is_fwd = (is_quoted && m_to.length==0 && m_cc.length==0) ;
+
+ // m_to will be an array of zero or more recipients for the To: field. Convert it to a string.
+ m_to_str = recipient_array_to_string(m_to);
+
+ // m_cc will be an array of zero or more recipients for the Cc: field. Convert it to a string.
+ m_cc_str = recipient_array_to_string(m_cc);