d397ac8c2ee2defbdcf2c148f0dd5d45a5a189ac hiram Mon Jan 19 16:38:22 2026 -0800 add a date stamp to the email refs #31811 diff --git src/hg/hubApi/liftOver.c src/hg/hubApi/liftOver.c index 0deb94f4cf7..9b15ee26f0c 100644 --- src/hg/hubApi/liftOver.c +++ src/hg/hubApi/liftOver.c @@ -296,33 +296,38 @@ if (isNotEmpty(referer) && isNotEmpty(userId)) { splitPath(referer, dir, name, ext); if (! (endsWith(dir, ".ucsc.edu/") && sameWord(name, "liftRequest") && sameWord(ext, ".html"))) apiErrAbort(err400, err400Msg, "can not find required inputs for endpoint '/liftRequest"); } else { if (! debug) apiErrAbort(err400, err400Msg, "can not find required inputs for endpoint '/liftRequest"); } char *toAddr = cfgOption("chainFileRequestEmail"); char *fromAddr = cfgOption("apiFromEmail"); if (isNotEmpty(toAddr) && isNotEmpty(fromAddr)) { + char nowTime[256]; + time_t seconds = clock1(); + struct tm *timeNow = localtime(&seconds); + strftime(nowTime, sizeof nowTime, "%Y-%m-%d %H:%M:%S", timeNow); + struct dyString *msg = newDyString(0); /* may need to encode these inputs to make them safe */ - dyStringPrintf(msg, "Lift over request\nfrom: %s\nto: %s\nemail '%s'\ncomment: '%s'", fromGenome, toGenome, email, comment); + dyStringPrintf(msg, "%s\nLift over request\nfrom: %s\nto: %s\nemail '%s'\ncomment: '%s'", nowTime, fromGenome, toGenome, email, comment); /* Even if the mailViaPipe returned a relevant return code, and I'm not * sure it would, there isn't much we can do about it from here. */ (void) mailViaPipe(toAddr, "liftOver request", msg->string, fromAddr); /* some kind of response here back to the request page */ struct jsonWrite *jw = apiStartOutput(); jsonWriteString(jw, "msg", dyStringCannibalize(&msg)); apiFinishOutput(0,NULL,jw); char *ottoTable = cfgOption("ottoTable"); /* probably ottoRequest */ if (isNotEmpty(ottoTable)) { struct sqlConnection *conn = hConnectCentral(); if (sqlTableExists(conn, ottoTable)) {