Microsoft Developer Network > 포럼 홈 > SharePoint - Development and Programming > SPUtility.SendEmail Function truncating htmlbody
질문하기질문하기
 

답변됨SPUtility.SendEmail Function truncating htmlbody

  • 2008년 2월 28일 목요일 오전 8: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일 금요일 오후 2: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일 금요일 오후 2: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일 일요일 오전 9: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.
    • 답변으로 제안됨Althaf Moideen 2009년 7월 24일 금요일 오전 6:31
    •