aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 6fa39bb930..df70d48baf 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -347,24 +347,20 @@ _send_to (CamelTransport *transport, CamelMedium *message,
GList *recipients, CamelException *ex)
{
CamelSmtpTransport *smtp_transport = CAMEL_SMTP_TRANSPORT (transport);
- CamelInternetAddress *cia;
- char *recipient, *sender;
+ const CamelInternetAddress *cia;
+ char *recipient;
const char *addr;
gboolean has_8bit_parts;
GList *r;
- sender = g_strdup (camel_mime_message_get_from (CAMEL_MIME_MESSAGE (message)));
- if (!sender) {
+ cia = camel_mime_message_get_from(CAMEL_MIME_MESSAGE (message));
+ if (!cia) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"Cannot send message: "
"sender address not defined.");
return FALSE;
}
- cia = camel_internet_address_new ();
- camel_address_decode (CAMEL_ADDRESS (cia), sender);
- g_free (sender);
-
if (!camel_internet_address_get (cia, 0, NULL, &addr)) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"Cannot send message: "