I'm looking into changing the text on the emails which are sent out after a user clicks the Request Access link on an Access Denied page in MOSS (2007).
This blog post has some helpful information, which pointed me to the RequestAccess class within the Microsoft.SharePoint.ApplicationPages assembly. By creating my own version of this class, installing it in the GAC, and changing the code-behind references for reqacc.aspx to my class, I've verified that I can manipulate the email being sent. However, the SendEmail() method there works from a template string and uses string.Format() to provide it with parameters.
In order to really change the text, it looks like I'll either need to throw out most of what the OOTB page is doing and re-create it, or modify that base template string. Ideally, I might not even need to make any changes to this class at all, if I can make my changes to the base string.
The problem is I can't find that base string. It should be identified as either "RequestAccessEmailBody1" or "RequestAccessEmailBody1List" (depending on the location which the access request is coming from), but I can't find either of these keys in wss.en-US.resx (from the IIS site directory, "C:\Inetpub\wwwroot\wss\VirtualDirectories\80\App_GlobalResources" for me) or any other .resx file I've searched in.
The pseudo-code version of the code I'm looking at from a decompiled version of RequestAccess.cs is:
emailBody = string.Format(SPResource.GetString("RequestAccessEmailBody1", userName), linkToServer, grantAccessLink, ... );
And the actual, horribly ugly, decompiled version is:
string[] strArray3 = new string[] { string.Format(SPHttpUtility.HtmlEncode(
SPResource.GetString(flag ? "RequestAccessEmailBody1" :
"RequestAccessEmailBody1List", new object[] { name })), "<a href = \"" +
SPHttpUtility.UrlPathEncode(serverRelativeUrl, true) + "\">" +
SPHttpUtility.HtmlEncode(serverRelativeUrl) + "</a>"), "<BR/><BR/>",
SPHttpUtility.HtmlEncode(SPResource.GetString("RequestAccessEmailBody1b",
new object[0])), "<BR/><BR/>- ", str7,
SPHttpUtility.HtmlEncode(SPResource.GetString(flag ? "RequestAccessEmailBody2" :
"RequestAccessEmailBody2List", new object[] { name })),
"</a><BR/><BR/>- <a href = \"", SPHttpUtility.UrlPathEncode((flag ? str9 : str8)
+ "setrqacc.aspx", true), "?type=", SPHttpUtility.UrlKeyValueEncode(flag ?
"web" : "list"), flag ? "" : ("&name=" +
SPHttpUtility.UrlKeyValueEncode(this.m_strListID)), "\">",
SPHttpUtility.HtmlEncode(SPResource.GetString(flag ? "RequestAccessEmailBody3" :
"RequestAccessEmailBody3List", new object[0])), "</a><BR/><BR/>", str10,
SPHttpUtility.HtmlEncode(SPResource.GetString("DoNotReplyText", new object[0]))
};
string txtMessageBody = string.Concat(strArray3);
Anyone know where these strings (RequestAccessEmailBody1 and RequestAccessEmailBody1List) are?