]> diplodocus.org Git - nmh/blobdiff - mts/smtp/smtp.c
Added NMH_ADDL_CPPFLAGS macro in new m4/cppflags.m4, to remove
[nmh] / mts / smtp / smtp.c
index 75e59f6f57d7c36a22a3dd96a984a2a88d426821..79c1e79b4d0da2b5850cab8899c1a93be27edf37 100644 (file)
@@ -1160,11 +1160,19 @@ sm_auth_xoauth2(const char *user, const char *oauth_svc, int snoop)
     const char *xoauth_client_res;
     int status;
 
+#ifdef OAUTH_SUPPORT
     xoauth_client_res = mh_oauth_do_xoauth(user, oauth_svc,
                                           snoop ? stderr : NULL);
 
-    if (xoauth_client_res == NULL)
-       return sm_ierror("Internal error: oauth_do_xoauth() returned NULL");
+    if (xoauth_client_res == NULL) {
+       return sm_ierror("Internal error: mh_oauth_do_xoauth() returned NULL");
+    }
+#else
+    NMH_UNUSED(user);
+    NMH_UNUSED(snoop);
+    adios(NULL, "sendfrom built without OAUTH_SUPPORT, "
+          "so oauth_svc %s is not supported", oauth_svc);
+#endif /* OAUTH_SUPPORT */
 
     status = smtalk(SM_AUTH, "AUTH XOAUTH2 %s", xoauth_client_res);
     if (status == 235) {