aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r--mail/mail-callbacks.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index 8cd61f0557..306b4e2003 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -272,6 +272,7 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
{
MailConfigService *xport = NULL;
CamelMimeMessage *message;
+ const CamelInternetAddress *iaddr;
const char *subject;
struct post_send_data *psd = data;
@@ -282,7 +283,17 @@ composer_send_cb (EMsgComposer *composer, gpointer data)
message = e_msg_composer_get_message (composer);
/* Check for no recipients */
- if (!camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO)) {
+ iaddr = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO);
+ if (!iaddr || CAMEL_ADDRESS (iaddr)->addresses->len == 0) {
+ GtkWidget *message_box;
+
+ message_box = gnome_message_box_new (_("You must specify recipients in order to send this message."),
+ GNOME_MESSAGE_BOX_WARNING,
+ GNOME_STOCK_BUTTON_OK,
+ NULL);
+
+ gnome_dialog_run_and_close (GNOME_DIALOG (message_box));
+
camel_object_unref (CAMEL_OBJECT (message));
return;
}
* many ports: mark broken on powerpc64swills2016-04-221-0/+2 * Remove ${PORTSDIR}/ from dependencies, categories r, s, t, and u.mat2016-04-011-2/+2 * science/bddsolve: Set environment, use CXXFLAGS, cleanupmarino2015-02-251-9/+5 * Cleanup plistantoine2014-11-131-1/+0 * - Support stagingehaupt2014-03-201-7/+6 * Convert s* to USES=zipbapt2014-03-111-1/+1 * Chase boost and icu bumpbapt2014-02-071-0/+1 * Convert LIB_DEPENDS for ports depending on boostbapt2013-12-121-2/+2 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * Remove USE_GCC.ed2013-09-151-1/+0 * Bump bddsolve to version 1.0.3.ed2013-09-152-9/+6 * Mark as broken on powerpc.linimon2011-12-281-0/+4