.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

SP2007 SPUtility.SendEmail

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :SharePoint


I would like to send a email with this method. Its work well but my "body" content is very big and ion my received mail, there not all my body content.

I wanted to know if there is a maximum longer for the body ? And if yes, how can I resolve it ?


View Complete Post

More Related Resource Links

SPUtility.sendEmail Body Length


I am using the SPUtility.sendEmail. I am preparing the body in html. I use the Line Break Tag <BR> as well.

The Email body is too long. But it is not sending all the email text. It truncate the data at the end of email. I don't know why it is giving me this behavior.

SPUtility.SendEmail usage puts some hardcoded or unwanted lines.


I am using SPutiltiy.SendEmail and most of the times it embeds the following big paragraph in the body of the email. Looks to be reading from one of the files that I found in this blog.


Has there been any resolution since year 2008 .

Although I do not want to modify the file directly, is there any other way of not having this big paragraph coming within the email.

What is a SharePoint site?

A SharePoint site is a Web site that provides a central storage and collaboration space for documents, information, and ideas. A SharePoint site is a tool for collaboration, just like a telephone is a tool for communication, or a meeting is a tool for decision making. A SharePoint site helps groups of people (whether work teams or social groups) share information and work together. For example, a SharePoint site can help you:

* Coordinate projects, calendars, and schedules.
* Discuss ideas and review documents or proposals.
* Share information and keep in touch with other people.

SharePoint sites are dynamic and interactive -- members of the site can contribute their own ideas and content as well as comment on or contrib

SPUtility.SendEmail Body Size


I found out that my email are received in truncated form. It seems body string of SPUtility.SendEmail is limited to several kb size.

Can i increase its size ?

IP2003 cascading dropdowns w/SP2007

I'm new to IP.  My client base is IP2003 only on SP2007.  The forms have repeating data sections so web form is out of the question as I understand it. :(  

The forms are run on the clients local version off IP.  I would like to use a SharePoint list as the basis for some cascading drop downs.  Is that a realistic idea in IP as described? 

SPUtility.TransferToErrorPage("My Message") not allowed to attach any controls event.

Hi, I have created a custom error page and update it using to webApplication using following code: WebApplication.UpdateMappedPage(SPWebApplicaton.SPCustomPage.Error, CustomErrorPage) My error page contains one link button and onClick event, I have to perform some operations. As I click on the button Error is occurred and onClick event code didn't execute. If I render custom error page by providing url in IE like http://myweburl/_layouts/myerrorpage then every thing is working fine i.e. every event is working fine. Also If I use SPUtility.Redirect() method instead of SPUtility.TransferToErrorPage() then also every thing is working fine. My error message is as follow in case of SPUtility.TransferToErrorPage(): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. StackTrace is [HttpException (0x80004005): Unable to validate data.]    System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +10988853    System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +295 [ViewStateException: Invalid viewstate. Client IP: fe80::8960:150e:cf5d:2e17%11 Port: 53192 User-Agent: Mozill

SP2007 restore problem

Hi, I'm restoring from an existing sp2007 server to a new sp2007 server using the central admin functions. I created my farm backup thru central admin.  Then i installed sp2007 and the same service packs on my new server.  NB The server has a different name.  The entire farm is on the one box i.e. sql server is installed on the same box as sp2007...i have this done on the new server as well. I then opened central admin on my new server and restored the whole farm using the central admin restore.  I did a 'new' restore and changed all pathways to be, for example, http://newserver:85.  However when i go to the pathway it goes to a dead link.  The resore seems to have been successful in the logs. I have looked on google and it says about doing some more config but im confused.  Can anyone point me to the steps im supposed to do at this point.  I want to get an exact replicia of my existing farm but just on the new server. Thanks for help...

how to get a sp2007 bdc definition file into sp2010

Any suggestion on how to upgrade the xml definition file used in 2007 to the new format used in 2010? I've found one tool, but it is quite expensive, as this will be a "one-off" job. (as the sharepoint designer now is quite ok to use when the main part is in there)

[SP2007] New item in doc library



I need cancel the add of new items in a doc library while they're already in and with a status ="Valid" or ="Obsolete"..

Have you an idea how shall i control this condition during the event?


http://nallerhand.free.fr >> Trucs & Astuces développement

SPUtility.TransferToErrorPage(message) System.Thread.Abort


In a web part, i create a new site and add some items to the list of the neew site.

Then i redirect to the site.

If there is any error i use the SPUtility.TransferToErrorPage(message) but there is an error System.Thread.Abort.


I was googling and found that if there is any code running, this error should appears.

Any solution for this problem? any other function?


TreeView not listing in certain document library in SP2007


Hi All,

        We are not able to view treeview for certain document libraries in SP2007 site but certain document libraries we able to view treeview ?

SP2007 designer list workflow to SP2010


Hello all,

Is there a way to ;
- get an upgraded Sharepoint designer 2007 list workflow into a 2010 VS WSP
- get an upgraded Sharepoint designer 2007 list workflow into a 2010 re-usable workflow

Without having to re-create ? :)


Fresh SP2007 Install on Windows 2003, get 404 error for Central Administrator


Hi Folks,

I am very new to Sharepoint (and Server 2003). Installed Sharepoint Server 2007 on a 64 bit machine over Windows Server 2003. This is a standalone install (No Server Farm). After "Sharepoint Products and Technologies Configuration Wizard" succesfully completes, I am unable to get to the Central Administration page (or any page). I get the error page: "HTTP Error 404  - File or directory not found. Internet Information Services (IIS)" .



I am unable to see any of the web pages in the Webroot directory and am stumped.



Here are some screen shots:


Can't redirect to another page using SPUtility.Redirect


I have a requirement:

Check out doc in the library -> Open doc by MS-WORD -> Save the doc -> Close the doc & Check in (In MS-WORD) -> Redirect to another page

I found it couldn't redirect to another page after closed & check in in the MS-WORD.

Here is my coding:

private HttpContext CNT_CONTEXT = null;

public override void ItemCheckingIn(SPItemEventProperties properties)
      if (CNT_CONTEXT == null)
        CNT_CONTEXT = HttpContext.Current;


    public override void ItemCheckedIn(SPItemEventProperties properties)
       SPUtility.Redirect(strDirectLink.ToString(), SPRedirectFlags.Trusted, CNT_CONTEXT);

I debug & found the CNT_CONTEXT is null when call ItemCheckedIn Event. And I test a case, if check in in the doc library, the coding worked.

So who can tell me how to redirect to another page after close & check in doc in MS-WORD.

Many thanks.

Policies are not enabled on e-mail contacts generated by SP2007 e-mail enabled lists


Hi all,

at a customer I have the following situation. We have a SharePoint 2007 Farm together with Exchange 2010. Whenever we enable a list for incoming e-mail the corresponding Exchange mail contact is created. So far, so good. But one of the properties of this e-mail contact is the toggle  "Automatically update e-mail addresses based on e-mail address policy" is not set. This is an issue because default it only gets a .local address and that is not enough.

Whenever I add an e-mail contact by hand this toggle is set. So I suppose that the way SharePoint sets this account differs from doing it by hand. Has anyone come accross this problem. Does someone have a solution or workaround.

Theo van Bokkem

the proplems when migrate lists from SP2007 to SP2010


I am migrating a list which includes a lookup column of Sharepoint  from SP2007 to SP2010 but having an issue that this column doesn't save data when working on SP2010. Do you know to fix it ?

Many Thanks

Ngoc Han

How to migrate a site from SP2007 to SP2010?


Hello world?

In our company we have both MOSS and SPFoundation. We have decided to migrate contents like site/web/list from MOSS to new SP environment.

Could anyone tell the procedure to do this by using Content Migration Deployment Object Model?

Many Thanks!

Gore T. Richard...

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend