Welcome to Office & SharePoint Pro Sign in | Join | Help
in Search

SUBSCRIBE to Windows IT Pro Magazine & SAVE 30%      FREE Email Newsletters Vista UPDATE, Windows IT Pro UPDATE & More

custom email message welcoming new user in moss - forms authentication

Last post 06-03-2008, 4:35 PM by LanciaHF. 1 replies.
Sort Posts: Previous Next
  •  02-25-2008, 3:32 PM 29324

    custom email message welcoming new user in moss - forms authentication

    Often developers find the requirement from the clients on the email message body that sharepoint sends out when a user is added to the site. It looks like the following, Welcome to the SharePoint site at: http://sharepointsite. System Account (domain\username) has granted you access to this site with the following permissions: Permission set.

     Clients do not need that message or they want to customize it. It is pretty easy to implement that.

    NOTE:The following solution works only when form authentication uses email to authenticate user. For other types, code has to be extended.

    Check the aclinv.aspx  file in the _layouts folder,  modify the following two sections of the file to send out custom email message.. Method 1: under the declarations sections modify the page declaration tagactual tag: <%@ Page Language="C#" Inherits="Microsoft.SharePoint.ApplicationPages.AclInv" MasterPageFile="~/_layouts/application.master" %>

     Replace inherits with your own class with two methods,

    1.       PageTitleUrl()2.       BtnOK_Click()Method 2:Else if you leave the Inherits to blank value, and write those two methods as part of the same page.Here is the simple Implementation for  BtnOK_Click()private void AddUser(Object sender , EventArgs args){

    //add the code to add user to group

    //either using  usergroup web service or sharepoint apis

    ArrayList al = userPicker.Accounts;

    string usersList = string.Empty;

    for (int i = 0; i < al.Count; i++)

    {

    usersList += al[i] +
    ";";

    }

    usersList = usersList.ToLower().Replace(
    "providername:", "");

    SPUtility.SendEmail(SPContext.Current.Web, true, true, usersList, txtEmailSubject.Text, txtEmailBody.Text);

     

    //in case of other authentication types replace userPicker.CommaSeperatedAccounts with own method for retrieving user emails from the people picker control

    Server.Transfer("/_layouts/user.aspx");} 
  •  06-03-2008, 4:35 PM 29736 in reply to 29324

    Re: custom email message welcoming new user in moss - forms authentication

    Hi, I see with some modifications I can alter the e-mail notifications that SharePoint sends out to our clients. I’m looking to completely modify the e-mail text. How would I get to this point in the modifications described in the post? Obviously I’m not a programmer but hopefully some one could take the time and show me where to start. Thank you,

     

View as RSS news feed in XML
SPONSORED LINKS FEATURED LINKS

SharePoint Security SimplifiedHaving trouble with Permissions in your SharePoint environment? Check out USPM v2007® Order Your Fundamentals CD Today!Get up to speed quickly and learn how to uncover rich information management and deployment capabilities with this free SharePoint CD. Simplify Content Migration for SharePointEase the job of SharePoint migration and ongoing site maintenance. Michael Noel outlines your migration options in this white paper. Download today! Prepare Yourself for Exchange CatastropheRead this white paper to learn how you can keep Exchange server healthy, as well as predict and respond to server failure. Featured eBook - Fundamentals of Fax Server TechnologyTake advantage of the benefits of fax servers and find out how you can implement a solution that is easy to support, secure, and integrate. Dramatically Accelerate Microsoft SharePointDeliver unimpeded access to SharePoint - Learn how to fix more than just the symptoms of slow application delivery and poor performance. Protect Your Company’s Digital AssetsDo you know the risks of sending important files over email or FTP? Read this white paper to learn what you can do to safeguard your company’s data. Boost Customer Confidence and SatisfactionRead this eBook to learn how fax servers can ease communication with less computer-savvy customers while reducing your security, compliance, and support woes. Implement a Successful Archiving SolutionView this web seminar to learn the best practices for creating an email archive that is secure, compliant, and searchable.