MSDN > 論壇首頁 > SharePoint - Development and Programming > SPUtility.SendEmail Function truncating htmlbody
發問發問
 

已答覆SPUtility.SendEmail Function truncating htmlbody

  • 2008年2月28日 上午 08:31NitinGupta4u 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

     

    Hi All,

     

    I am sending an email to my sharepoint portal user through SPUtility.SendEmail Function. Its working fine but when ever my message body exceeds 2048 characters it gets truncated by the function.

    Is there any maximum lenght for email message body?

    Please help...

     

     

    Nitin Gupta

解答

  • 2008年2月29日 下午 02:04Toby Statham 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    Hi Nitin,

     

    I would the use System.Net.Mail to send the email. The one provided in SPUtility is a little restrictive. You can use the OutboundMailSenderAddress property of SPWebApplication to get the SMTP address that the server is using.

     

    Cheers

     

所有回覆

  • 2008年2月29日 下午 02:04Toby Statham 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     已答覆

    Hi Nitin,

     

    I would the use System.Net.Mail to send the email. The one provided in SPUtility is a little restrictive. You can use the OutboundMailSenderAddress property of SPWebApplication to get the SMTP address that the server is using.

     

    Cheers

     

  • 2009年2月8日 上午 09:36Sudheesh Warrier 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Have you got any other solution for this problem?

    I am also facing this issue, and unfortunatly i m not allowed to use "System.Net.Mail" this namespace in my org.
  • 2009年2月23日 下午 11:50Anozireth 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     提議的解答
    I just ran into this issue as well, and discovered that SPUtility.SendEmail seems to cap the length of a single line.  I added newlines after each tag in the body of my email and it works like a charm.