/ Forums / Advansys Formativ / Formativ Creator / HTML emails not displaying correctly on forward or reply / Reply To: HTML emails not displaying correctly on forward or reply

#5589
Support 3
Participant

    Object API does not expose any method to create the HTML message easily. We have been asking Novell to add method to create HTML message and finally GroupWise 8 may have this method.

    In the meantime, you have to create the TEXT.htm file and add as an attachment to create the proper HTML message. The following code save the HTML contents to TEXT.htm file and add as an attachment to the message. Another modification to your code, we recommend to create the draft message in Work-In-Progress folder rather then the mailbox.

      
      dim newMail
      dim srlText
      dim mailTo
      dim subject
    
      Set srlText = Utilities.StringList
      Set newMail = GroupWise.Account.workfolder.Messages.Add("GW.MESSAGE.MAIL")
    
      srlText.Add("<HTML><BODY>" + vbCrLf)
      srlText.Add("<FONT TYPE=" + chr(34) + "VEDANA " + chr(34) + "SIZE=" + chr(34) + "3" + chr(34) + ">")
      srlText.Add("<BR> This is a link to ")
      srlText.Add("<A HREF=" + chr(34) + "http://www.advansyscorp.com/forums/forum/3634089931-2/")
      srlText.Add(chr(34) + ">Formativ Forums</A> <BR>")
      srlText.Add(vbCrLf + "</FONT></BODY></HTML>")
    
      call utilities.savestringtofile(srlText.Text, utilities.TempFiles & "TEXT.htm", true)
    
    
      subject = "Formativ Forum Support"
      mailTo = "test@yourcorp.com"
    
      newMail.Recipients.Add mailTo, , 0
      call newMail.attachments.add(utilities.TempFiles & "TEXT.htm", fgwFile, "TEXT.htm")
    
      newMail.Subject = subject
      newMail.Send
    

    Regards,
    Advansys Support