aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 847019ecd4..d7bfb9af10 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -206,7 +206,6 @@ typedef struct send_mail_input_s
{
gchar *xport_uri;
CamelMimeMessage *message;
- gchar *from;
/* If done_folder != NULL, will add done_flags to
* the flags of the message done_uid in done_folder. */
@@ -268,12 +267,6 @@ setup_send_mail (gpointer in_data, gpointer op_data, CamelException *ex)
return;
}
- if (input->from == NULL) {
- camel_exception_set (ex, CAMEL_EXCEPTION_INVALID_PARAM,
- "No from address specified for send_mail operation.");
- return;
- }
-
/* NOTE THE EARLY EXIT!! */
if (input->done_folder == NULL) {
@@ -312,12 +305,14 @@ do_send_mail (gpointer in_data, gpointer op_data, CamelException *ex)
{
send_mail_input_t *input = (send_mail_input_t *) in_data;
CamelTransport *xport;
+ char *x_mailer;
mail_tool_camel_lock_up ();
- camel_mime_message_set_from (input->message, input->from);
-
+ x_mailer = g_strdup_printf ("Evolution %s (Developer Preview)",
+ VERSION);
camel_medium_add_header (CAMEL_MEDIUM (input->message), "X-Mailer",
- "Evolution (Developer Preview)");
+ x_mailer);
+ g_free (x_mailer);
camel_mime_message_set_date (input->message,
CAMEL_MESSAGE_DATE_CURRENT, 0);
@@ -355,7 +350,6 @@ cleanup_send_mail (gpointer in_data, gpointer op_data, CamelException *ex)
if (input->done_folder)
camel_object_unref (CAMEL_OBJECT (input->done_folder));
- g_free (input->from);
g_free (input->xport_uri);
g_free (input->done_uid);
@@ -376,7 +370,6 @@ static const mail_operation_spec op_send_mail = {
void
mail_do_send_mail (const char *xport_uri,
CamelMimeMessage *message,
- const char *from,
CamelFolder *done_folder,
const char *done_uid,
guint32 done_flags, GtkWidget *composer)
@@ -386,7 +379,6 @@ mail_do_send_mail (const char *xport_uri,
input = g_new (send_mail_input_t, 1);
input->xport_uri = g_strdup (xport_uri);
input->message = message;
- input->from = g_strdup (from);
input->done_folder = done_folder;
input->done_uid = g_strdup (done_uid);
input->done_flags = done_flags;