Click or drag to resize

CrestronMailFunctionsSendMail(String, Boolean, String, String, String, String, String, String, String, String, String, CrestronMailFunctionseMailPriority, UInt16, String) Method

Send an email message with attachments using SMTP protocol. The minimum firmware version is 1.013.0000 for this method to work.

Namespace: Crestron.SimplSharp
Assembly: SimplSharpHelperInterface (in SimplSharpHelperInterface.dll) Version: 2.21.121
Syntax
C#
public static CrestronMailFunctionsSendMailErrorCodes SendMail(
	string Server,
	bool SecureConnection,
	string UserLogonName,
	string UserLogonPassword,
	string From,
	string To,
	string ReplyTo,
	string CC,
	string BCC,
	string Subject,
	string Message,
	CrestronMailFunctionseMailPriority Priority,
	ushort NumberOfAttachments,
	string Attachments
)

Parameters

Server  String
Required. Specifies address of the mail server.
SecureConnection  Boolean
Required. Specifies that email transfer should use SSL connection or not.
UserLogonName  String
Optional: User logon name.
UserLogonPassword  String
Optional: User password.
From  String
Required: Sender (Only one address).
To  String
Required: Recipients
ReplyTo  String
Optional. Mail address(es) to use to reply to this message.
CC  String
Optional: Other Recipients.
BCC  String
Optional: Other undisclosed Recipients.
Subject  String
Optional: Subject of Message.
Message  String
Optional: Body of message.
Priority  CrestronMailFunctionseMailPriority
Optional: Priority of message. Refer CrestronMailFunctionseMailPriority for valid message priorities.
NumberOfAttachments  UInt16
Number of attachments User adds.
Attachments  String
Attachment filenames.

Return Value

CrestronMailFunctionsSendMailErrorCodes
SMTP_OK if successful. Otherwise, Email Return Error Code is returned. Negative return error codes indicate that no part of the email was sent. Positive return error codes indicate a failure, but the email was still sent. In the event of more than one failure, the return error code of the first failure is returned.

Version Information

.NET

Supported in: 6.0

.NET Compact Framework

Supported in: 3.5
See Also