38535c51763df43a76e29658192a7917a92ec822 chinhli Mon Apr 30 15:59:44 2012 -0700 Finish confirmationScreen. diff --git src/hg/hgLogin/hgLogin.c src/hg/hgLogin/hgLogin.c index fc82f7c..9739596 100644 --- src/hg/hgLogin/hgLogin.c +++ src/hg/hgLogin/hgLogin.c @@ -28,67 +28,117 @@ char *excludeVars[] = { "submit", "Submit", "debug", "fixMembers", "update", "hgLogin_password", "hgLogin_password2", "hgLogin_newPassword1", "hgLogin_newPassword2", NULL }; /* The excludeVars are not saved to the cart. (We also exclude * any variables that start "near.do.") */ /* ---- Global variables. ---- */ struct cart *cart; /* This holds cgi and other variables between clicks. */ char *database; /* Name of genome database - hg15, mm3, or the like. */ struct hash *oldCart; /* Old cart hash. */ char *errMsg; /* Error message to show user when form data rejected */ /* -------- utilities functions --- */ - -void sendMail(char *email, char *subject, char *msg) +void displayMailSuccess() +/* display mail success msg, and set cookie */ +{ +char *email = cartUsualString(cart, "hgLogin_email", ""); +char *obj=cartUsualString(cart, "hgLogin_helpWith", ""); +//safecpy(obj, sizeof(obj),object); +hPrintf( +"
An email has been sent to " +" %s containing %s...
" +"\n" +"" +, email +, obj +); +// backToDoLoginPage(12); +} +void sendMail(char *email, char *subject, char *msg, char *object) { +char *hgLoginHost = hgLoginLinkHost(); char cmd[256]; safef(cmd,sizeof(cmd), // "echo 'Hello from your favoriate browser at: %s %s ' | mail -s \"Greeting form UCSC Genome Browser\" %s" // , msg, httpLink, email); //"echo '%s' | mail -s \"Greeting from uCSC\" %s" "echo '%s' | mail -s \"%s\" %s" , msg, subject, email); int result = system(cmd); if (result == -1) { hPrintf( "" "
" "" "
" "An email has been sent to " +" $email containing %s...
" +"\n" +"" +"\n" +"