Simple Mail and Post Office Protocol for .Net (SmtPop)

MessageBuilder.Build Method (String, String, String, String, MimeTextContentType, Object, String, String)

Build a MimeMessage with text body and binary data as attachment

public static MimeMessage Build(
   string From,
   string To,
   string Subject,
   string Body,
   MimeTextContentType TextType,
   object data,
   string MimeType,
   string Name
);

Parameters

From
The source address
To
The destination address
Subject
The mail subjec
Body
The text body
TextType
The body Content-Type
data
The object to serialize in binary data
MimeType
The Mime type of binary data (ie "application/binary")
Name
The attachment's name

Return Value

A MimeMessage

Remarks

All text is encoded with the default charset define in SmtPop.Config
The data Object must be binary serializable

See Also

MessageBuilder Class | SmtPop Namespace | MessageBuilder.Build Overload List