See Also

HtmlMessage Members  | ceTe.FireMail Namespace

Requirements

Namespace: ceTe.FireMail

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.FireMail (in ceTe.FireMail.dll)

Language

Visual Basic

C#

Show All

Represents a MIME formatted Html based Message.

For a list of all members of this type, see HtmlMessage members.

Object Model









Inheritance Hierarchy

System.Object
   ceTe.FireMail.Message
      ceTe.FireMail.HtmlMessage

Syntax

[Visual Basic]
Public Class HtmlMessage    Inherits Message
[C#]
public class HtmlMessage : Message

Remarks

This message will contain main body (ref. Body) in Html format and if required alternative text format can be supplied using AltBody.

Generally alternative text message will be displayed in clients which required text message.

Example

The following example shows how to create a HtmlMessage with embedded image.

[Visual Basic] 

Imports ceTe.FireMail

Module MyModule

    Sub Main()

        ' Create a Html Message
        Dim MyMessage As New HtmlMessage("Full Name", "from@company.com")

        ' Add a To recipient
        MyMessage.To.Add("Full Name", "to@company.com")

        ' Add subject
        MyMessage.Subject = "HTML Message with Embedded Image"

        ' Html body which contains images embedded using cid.
        MyMessage.Body = "<HTML><BODY>" & _
                         "Example of Image Embedded using <STRONG>Cid</STRONG>." & _
                         "<br> <img src='cid:img1_12x23'>" & _
                         "<br> End of Html Message.</BODY> </HTML>"

        ' Assign alternative plain text body
        MyMessage.AltBody = "This message contains Html embedded image"

        ' Add the Embedded image into HtmlContent Attachment. Specify the cid as same in HTML
        MyMessage.HtmlContentAttachments.Add("image.jpg", "img1_12x23")

        MyMessage.Send("localhost")

    End Sub

End Module

[C#] 

using ceTe.FireMail; 
  
class MyClass 

    static void Main(string[] args) 
    { 
        // Create a Html Message 
        HtmlMessage message = new HtmlMessage( "Full Name", "from@company.com" ); 
             
        // Add a To recipient 
        message.To.Add( "Full Name", "to@company.com" ); 
  
        // Assign subject 
        message.Subject = "HTML Message with Embedded Image"; 
             
        // Html body which contains images embedded using cid. 
        message.Body = "<HTML><BODY>"+ 
            "Example of Image Embedded using <STRONG>Cid</STRONG>."+ 
            "<br> <img src='cid:img1_12x23'>"+ //img src specified using cid:<cidName> 
            "<br> End of Html Message.</BODY> </HTML>"; 
  
        // Assign alternative plain text body 
        message.AltBody = "This message contains Html embedded image"; 
  
        // Add the Embedded image into HtmlContent Attachment. Specify the cid as same in HTML 
        message.HtmlContentAttachments.Add( "image.jpg", "img1_12x23" ); 
  
        message.Send("localhost"); 
    } 

Licensing

This class is a FireMail feature. One of the following licenses is required for non-evaluation usage:

Requirements

Namespace: ceTe.FireMail

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.FireMail (in ceTe.FireMail.dll)

See Also

HtmlMessage Members  | ceTe.FireMail Namespace

 

 


© Copyright 2006, ceTe Software