From 37ffc13dcb735d0863377a71bed3f78adf53d875 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 26 Oct 2000 06:09:47 +0000 Subject: Check for the TO recipient list being NULL and don't send. 2000-10-26 Jeffrey Stedfast * mail-callbacks.c (composer_send_cb): Check for the TO recipient list being NULL and don't send. svn path=/trunk/; revision=6201 --- mail/ChangeLog | 5 +++++ mail/mail-callbacks.c | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'mail') 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 + + * mail-callbacks.c (composer_send_cb): Check for the TO recipient + list being NULL and don't send. + 2000-10-25 Jeffrey Stedfast * 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') { -- cgit v1.2.3