Index: camel/providers/groupwise/camel-groupwise-utils.c
===================================================================
--- camel/providers/groupwise/camel-groupwise-utils.c	(revision 8397)
+++ camel/providers/groupwise/camel-groupwise-utils.c	(working copy)
@@ -300,7 +300,7 @@
 	if (cid)
 		attachment->contentid = camel_header_contentid_decode (cid);
 
-	if (filename) {
+	if (filename && content->buffer->data) {
 		if (camel_content_type_is (type, "application", "pgp-signature")) {
 			char *temp_str;
 			int temp_len;
@@ -315,7 +315,7 @@
 			attachment->data = g_base64_encode(content->buffer->data, content->buffer->len);
 			attachment->size = strlen (attachment->data);
 		}
-	} else {
+	} else if (content->buffer->data) {
 		char *temp_str;
 		int temp_len;
 		if (!strcmp (attachment->contentType, "multipart/digest")) {
Index: camel/providers/groupwise/ChangeLog
===================================================================
--- camel/providers/groupwise/ChangeLog	(revision 8397)
+++ camel/providers/groupwise/ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2008-01-22  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #498977
+
+	* camel-groupwise-utils.c: (send_as_attachment):
+	Prevent encoding to base64 of no data in the content buffer.
+
 2008-01-17  Matthew Barnes  <mbarnes@redhat.com>
 
 	* camel-groupwise-store.c (groupwise_auth_loop):
