From 99a7cb5c61edb0f1703aa607e79c15ac254c5f86 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 15 Mar 2001 03:32:50 +0000 Subject: defined "ssmtp" 2001-03-14 Jeffrey Stedfast * providers/smtp/libcamelsmtp.urls: defined "ssmtp" * providers/smtp/camel-smtp-provider.c: Defined the Secure SMTP provider. (camel_provider_module_init): Register the Secure SMTP provider. svn path=/trunk/; revision=8726 --- camel/providers/smtp/camel-smtp-provider.c | 35 ++++++++++++++++++++++++++++-- camel/providers/smtp/libcamelsmtp.urls | 1 + 2 files changed, 34 insertions(+), 2 deletions(-) (limited to 'camel/providers/smtp') diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c index 0436800554..ec173ac5e8 100644 --- a/camel/providers/smtp/camel-smtp-provider.c +++ b/camel/providers/smtp/camel-smtp-provider.c @@ -47,15 +47,46 @@ static CamelProvider smtp_provider = { NULL }; +#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) +static CamelProvider ssmtp_provider = { + "ssmtp", + N_("Secure SMTP"), + + N_("For delivering mail by connecting to a remote mailhub " + "using SMTP over an SSL connection.\n"), + + "mail", + + CAMEL_PROVIDER_IS_REMOTE, + + CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH, + + { 0, 0 }, + + NULL +}; +#endif + void camel_provider_module_init (CamelSession *session) { smtp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = - camel_smtp_transport_get_type(); - + camel_smtp_transport_get_type (); +#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) + ssmtp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = + camel_smtp_transport_get_type (); +#endif + smtp_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal); + +#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) + ssmtp_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal); +#endif camel_session_register_provider (session, &smtp_provider); +#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) + camel_session_register_provider (session, &ssmtp_provider); +#endif } diff --git a/camel/providers/smtp/libcamelsmtp.urls b/camel/providers/smtp/libcamelsmtp.urls index ec2fc0fc16..d786e01295 100644 --- a/camel/providers/smtp/libcamelsmtp.urls +++ b/camel/providers/smtp/libcamelsmtp.urls @@ -1 +1,2 @@ smtp +ssmtp -- cgit