aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/sendmail/camel-sendmail-transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/sendmail/camel-sendmail-transport.c')
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/camel/providers/sendmail/camel-sendmail-transport.c b/camel/providers/sendmail/camel-sendmail-transport.c
index 0d51333955..7ee5c3bdab 100644
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ b/camel/providers/sendmail/camel-sendmail-transport.c
@@ -45,7 +45,8 @@ static gboolean sendmail_can_send (CamelTransport *transport, CamelMedium *messa
static gboolean sendmail_send (CamelTransport *transport, CamelMedium *message,
CamelException *ex);
static gboolean sendmail_send_to (CamelTransport *transport, CamelMedium *message,
- CamelAddress *recipients, CamelException *ex);
+ CamelAddress *from, CamelAddress *recipients,
+ CamelException *ex);
static void
@@ -198,22 +199,25 @@ get_from (CamelMedium *message, CamelException *ex)
static gboolean
sendmail_send_to (CamelTransport *transport, CamelMedium *message,
- CamelAddress *recipients, CamelException *ex)
+ CamelAddress *from, CamelAddress *recipients,
+ CamelException *ex)
{
- const char *from, *addr, **argv;
+ const char *from_addr, *addr, **argv;
gboolean status;
int i, len;
- from = get_from (message, ex);
if (!from)
return FALSE;
+ if (!camel_internet_address_get (CAMEL_INTERNET_ADDRESS (from), 0, NULL, &from_addr))
+ return FALSE;
+
len = camel_address_length (recipients);
argv = g_malloc ((len + 6) * sizeof (char *));
argv[0] = "sendmail";
argv[1] = "-i";
argv[2] = "-f";
- argv[3] = from;
+ argv[3] = from_addr;
argv[4] = "--";
for (i = 0; i < len; i++) {