Constructs an
CopyC#
EmailMessage
instance defining to and from addresses.

Namespace: Jscape.Email
Assembly: Jscape.Email (in Jscape.Email.dll) Version: 2.4.5.0

Syntax

C#
public EmailMessage(
	string to,
	string from
)
Visual Basic
Public Sub New ( _
	to As String, _
	from As String _
)
Visual C++
public:
EmailMessage(
	String^ to, 
	String^ from
)

Parameters

to
Type: System..::..String
The To: address.
from
Type: System..::..String
The From: address.

Remarks

Default headers, Date, MIME-Version, Message-ID, Content-Transfer-Encoding and Content-Type are added automatically.

Examples

This example creates an EmailMessage using the default us-ascii character set encoding for the To and From properties.
CopyMime EmailMessage
String to = "to@theirserver.com";
String from = "me@myserver.com";
EmailMessage message = new EmailMessage(to, from);

CopyMime EmailMessage
Dim to As String = "to@theirserver.com"
Dim from As String = "me@myserver.com"
Dim message As EmailMessage = New EmailMessage(to, from);

See Also