]> diplodocus.org Git - nmh/blobdiff - uip/sendsbr.c
Change this so the MTS_SMTP is the default, to match the value
[nmh] / uip / sendsbr.c
index e55361c8d98320e6befcc7bc4e7cb3d6ddc170d3..c4d25029f26615d29d7ca6e9ee664b0756e23bf2 100644 (file)
@@ -129,10 +129,15 @@ sendsbr (char **vec, int vecp, char *program, char *draft, struct stat *st,
         */
 
        if (auth_svc) {
+#ifdef OAUTH_SUPPORT
                const char *errmsg;
                if (setup_oauth_params(vec, nvecsp, auth_svc, &errmsg) != OK) {
                        adios(NULL, errmsg);
                }
+#else
+                adios(NULL, "send built without OAUTH_SUPPORT, "
+                      "so auth_svc %s is not supported", auth_svc);
+#endif /* OAUTH_SUPPORT */
        }
 
         /*
@@ -765,7 +770,8 @@ handle_sendfrom(char **vec, int *vecp, char *draft, const char *auth_svc) {
                 }
                 break;
 #else
-                adios(NULL, "sendfrom built without OAUTH_SUPPORT, "
+                NMH_UNUSED(auth_svc);
+                adios(NULL, "send built without OAUTH_SUPPORT, "
                       "so -saslmech xoauth2 is not supported");
 #endif /* OAUTH_SUPPORT */
             }
@@ -815,7 +821,9 @@ setup_oauth_params(char *vec[], int *vecp, const char *auth_svc,
                                            sizeof(errbuf)))
                adios(NULL, "Unable to retrieve oauth profile entries: %s",
                      errbuf);
-           
+
+           vec[(*vecp)++] = getcpy("-authservice");
+           vec[(*vecp)++] = getcpy(auth_svc);
            vec[(*vecp)++] = getcpy("-oauthcredfile");
            vec[(*vecp)++] = getcpy(mh_oauth_cred_fn(auth_svc));
            vec[(*vecp)++] = getcpy("-oauthclientid");