diff options
Diffstat (limited to 'camel/providers/smtp/camel-smtp-transport.c')
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index f7de36f571..5b9e858a65 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -473,9 +473,9 @@ smtp_helo (CamelSmtpTransport *transport, CamelException *ex) /* hiya server! how are you today? */ if (smtp_is_esmtp) - cmdbuf = g_strdup_printf ("EHLO %s\r\n", host->h_name); + cmdbuf = g_strdup_printf ("EHLO %s\r\n", host && host->h_name ? host->h_name : inet_ntoa(localaddr.sin_addr)); else - cmdbuf = g_strdup_printf ("HELO %s\r\n", host->h_name); + cmdbuf = g_strdup_printf ("HELO %s\r\n", host && host->h_name ? host->h_name : inet_ntoa(localaddr.sin_addr)); if ( camel_stream_write (transport->ostream, cmdbuf, strlen(cmdbuf), ex) == -1) { g_free(cmdbuf); camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, |