I eventually figured out the issue after playing with the code. There were actually two separate problems, both equating to syntax issues.
Issue #1
In the original script the subject is called via “&subject”.
I don’t know why, I still have no idea, and I’m ignorant when it comes to programming, BUT, based on scripting examples I saw on some forums, I changed the ampersand to a question mark ( “?subject” ) and it started working again – distributing the field structure of the email correctly.
I saw "&subject" in scripting examples on forums, as well - not implying that this syntax is incorrect. But it no longer works for our implementation. Weird!
Issue #2
We upgraded several gateways over the course of a week or two, to R80.40 JHF 91. Most of these gateways were on R80.40, though not all. Subsequent to the upgrades, some of the syntax in the scripts was corrupted with what I am assuming were incorrectly translated/interpreted ascii characters. In other words, some of the characters of the original script were replaced with ascii characters that had no function or use in the script. I corrected these errors and everything has been solid since. I didn’t upgrade the gateways, and the guy who did doesn’t remember exactly which were R80.40 already, so I couldn’t correlate whether the corruption occurred from upgrading a specific version.
Here is my code as it is running today (minus company-specific info):
--------------------------------
function submitform()
{
var Variables = window.oUserAction.incidentObject.Variables;
var user_name = Variables['user_name'];
var category = Variables['category'];
var origUrl = Variables['resource'];
var src_ip = Variables['src_ip'];
//Get the application name. If this variable has been modified (added application icon for example), take the original.
var appname = Variables['application_name_orig'];
if(appname === undefined)
appname = Variables['application_name'];
var link = "mailto:REDACTED"
+ "?subject=" + escape("Blocked Web Page")
+ "&body=" + escape("****Please assign to REDACTED****" + "\r\n" + "Please provide a brief explanation/justification for access to this website: " + "\r\n" + "\r\n" + "\r\n" + "Username: " + user_name + "\r\n" + "URL: " + origUrl + "\r\n" + "Application: " + appname + "\r\n" + "Category: " + category + "\r\n" + "Client IP: " + src_ip + "\r\n");
window.location.href = link;
};
---------------------------------
I still applaud this excellent customization! It is quite useful. Thank you!