aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-callbacks.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 61b22d9f3d..6224b74690 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-26 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * mail-callbacks.c (composer_send_cb): Check for the TO recipient
+ list being NULL and don't send.
+
2000-10-25 Jeffrey Stedfast <fejj@helixcode.com>
* mail-ops.c (do_send_mail): Don't forget to unref the
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 1b088fe4df..8cd61f0557 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -281,6 +281,12 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
/* Get the message */
message = e_msg_composer_get_message (composer);
+ /* Check for no recipients */
+ if (!camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO)) {
+ camel_object_unref (CAMEL_OBJECT (message));
+ return;
+ }
+
/* Check for no subject */
subject = camel_mime_message_get_subject (message);
if (subject == NULL || subject[0] == '\0') {