Archive

Posts Tagged ‘sharepoint’

GUI for STSADM

April 3rd, 2009 Anuraj P No comments

Are you tired of using the command-line version of STSADM? Then, download STSADMWin, the GUI for the powerful command line utility STSADM, from here .
I found STSADMWin a very helpful tool. It lists all the STSADM commands in dropdown, and as you select a command, all the parameters for the command show up. You won’t miss any, even if you want to. Drop the downloaded file to \12\BIN directory and run the executable.
Rock it!

Thanks to my colleague Meera for this useful information.

Categories: .Net, sharepoint Tags: ,

SPUtility.SendEmail

November 7th, 2007 Anuraj P 9 comments

In my project I need to send mail to Administrator, while adding items to a list using Webpart. I have tried ASP.Net, System.Net namespace but I need to read all the server and mail settings from any config file. After I got sharepoint’s own mechanism to send mail.

SPUtility.SendEmail(SPContext.Current.Site.OpenWeb(), false, false, "admin@myserver.com", "Hello World", "This is a Sample Mail");

This will send a mail to “admin@myserver.com”, with “Hello World” as subject and “This is a Sample Mail” as body. You can send HTML emails by changing the third parameter to TRUE.

Update : You may need to use SPSecurity.RunWithElevatedPrivileges method to send mails.

Url :

http://msdn2.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges.aspx

This method enable users to Execute the specified method with Full Control rights even if the user does not otherwise have Full Control.