MSDN > Home page del forum > SharePoint - Development and Programming > SPUtility.SendEmail Function truncating htmlbody
Formula una domandaFormula una domanda
 

Con rispostaSPUtility.SendEmail Function truncating htmlbody

  • giovedì 28 febbraio 2008 8.31NitinGupta4u Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     

     

    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

Risposte

  • venerdì 29 febbraio 2008 14.04Toby Statham Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta

    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

     

Tutte le risposte

  • venerdì 29 febbraio 2008 14.04Toby Statham Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Con risposta

    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

     

  • domenica 8 febbraio 2009 9.36Sudheesh Warrier Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     
    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.
  • lunedì 23 febbraio 2009 23.50Anozireth Medaglie utenteMedaglie utenteMedaglie utenteMedaglie utenteMedaglie utente
     Risposta suggerita
    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.