aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-ops.c30
2 files changed, 30 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 73771aa63b..5b0943376e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,9 @@
+2001-01-17 Ettore Perazzoli <ettore@ximian.com>
+
+ * mail-ops.c (set_x_mailer): New function.
+ (send_mail_send): Use it.
+ (do_send_queue): Use it.
+
2001-01-17 Martin Norbäck <d95mback@dtek.chalmers.se>
* openpgp-utils.c (pgp_get_passphrase): Changed the word entry
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 26202e3cfd..dd14c320f1 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -47,6 +47,23 @@ int mail_operation_run(const mail_operation_spec *op, void *in, int free);
#define mail_tool_camel_lock_down()
#define mail_tool_camel_lock_up()
+
+/* Utility functions. */
+
+static void
+set_x_mailer (CamelMimeMessage *message)
+{
+ const char *xmailer_version;
+
+ if (SUB_VERSION[0] == '\0')
+ xmailer_version = "Evolution (" VERSION " - Preview Release)";
+ else
+ xmailer_version = "Evolution (" VERSION "/" SUB_VERSION " - Preview Release)";
+
+ camel_medium_add_header(CAMEL_MEDIUM (message), "X-Mailer", xmailer_version);
+}
+
+
/* ** FETCH MAIL ********************************************************** */
typedef struct fetch_mail_input_s
@@ -551,14 +568,15 @@ static char *send_mail_desc(struct _mail_msg *mm, int done)
static void send_mail_send(struct _mail_msg *mm)
{
struct _send_mail_msg *m = (struct _send_mail_msg *)mm;
- extern CamelFolder *sent_folder;
+ extern CamelFolder *sent_folder; /* FIXME */
CamelMessageInfo *info;
CamelTransport *xport;
FilterContext *context;
- camel_medium_add_header(CAMEL_MEDIUM (m->message), "X-Mailer", "Evolution (" XMAILER_VERSION " - Preview Release)");
+ set_x_mailer (m->message);
+
camel_mime_message_set_date(m->message, CAMEL_MESSAGE_DATE_CURRENT, 0);
-
+
xport = camel_session_get_transport(session, m->uri, &mm->ex);
if (camel_exception_is_set(&mm->ex))
return;
@@ -696,9 +714,9 @@ do_send_queue (gpointer in_data, gpointer op_data, CamelException *ex)
message = camel_folder_get_message (input->folder_queue, uids->pdata[i], ex);
if (camel_exception_is_set (ex))
break;
-
- camel_medium_add_header (CAMEL_MEDIUM (message), "X-Mailer", "Evolution (" XMAILER_VERSION " - Preview Release)");
-
+
+ set_x_mailer (message);
+
camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0);
/* Get the preferred transport URI */