HTMLMailer Component
Properties Methods Events Configuration Settings Errors
The HTMLMailer Component is used to send HTML email including embedded images.
Syntax
nsoftware.IPWorks.Htmlmailer
Remarks
The component sends a message (provided in MessageHTML and MessageText). The HTML message may contain references to images which are automatically embedded into the message.
The MessageHTML property contains the HTML version of the message. The corresponding plain text version is provided into the MessageText property.
When MessageHTML is set, the component automatically computes a plaintext version of the text and puts it into MessageText. You may choose to override this default text with your own version.
The recipients are specified by the SendTo, Cc, and BCc properties, and the message subject by the Subject property.
Once all the appropriate properties have been set call the Send method and your message will be sent to its intended recipient(s).
Other SMTP headers may be specified through the OtherHeaders property. Information about interaction with the server is provided via the PITrail event.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
Attachments | The paths of files to attach to the message. |
AuthMechanism | Used when connecting to the mail server. |
BCc | A comma separated list of addresses for blind carbon copies (optional). |
Cc | A comma separated list of addresses for carbon copies (optional). |
Command | Used to send additional commands directly to the server. |
Connected | Shows whether the component is connected. |
DeliveryNotificationTo | Email address to send to which to send a delivery notification. |
Firewall | A set of properties related to firewall access. |
From | The email address of the sender (required). |
HTMLFile | The path to a local HTML file. |
Idle | The current status of the component. |
Images | The embedded images in the HTML message. |
Importance | Importance of the mail message (optional). |
LastReply | The last reply from the server. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
MailPort | The server port for SMTP (default 25). |
MailServer | The name or address of a mail server (mail relay). |
MessageDate | Date of the mail message (optional). |
MessageHTML | The HTML version of the message. |
MessageId | The Message Identifier for the message. |
MessageRecipients | The collection of recipients of the message. |
MessageText | The plain text version of the message. |
OtherHeaders | An RFC 822 compliant string consisting of extra headers. |
ParseHTML | Controls the behavior of the MessageHTML property. |
Password | A password for logon to the MailServer . |
Priority | Priority of the mail message (optional). |
ReadReceiptTo | Email address to send a read receipt to. |
ReplyTo | A mail address to which to reply (optional). |
SendTo | A comma separated list of addresses for destinations (required). |
Sensitivity | Sensitivity of the mail message (optional). |
Subject | The subject of the mail message (optional). |
Timeout | A timeout for the component. |
User | A user identifier to login as in the MailServer . |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
AddAttachment | Adds FileName as an attachment. |
Config | Sets or retrieves a configuration setting . |
Connect | Connects to the mail relay and sends the SMTP HELO command. |
Disconnect | Disconnects from the SMTP server. |
DoEvents | Processes events from the internal message queue. |
Interrupt | Interrupt the current method. |
ProcessQueue | Sends the messages which have previously been queued into QueueDir . |
Queue | Queues the message into QueueDir . |
ResetHeaders | Resets all the message headers to empty. |
Send | Sends the current message and MIME encoded attachment. |
Event List
The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.
ConnectionStatus | Fired to indicate changes in connection state. |
EndTransfer | Fired when the message text completes transferring. |
Error | Information about errors during data delivery. |
PITrail | Traces the commands sent to the mail server, and the respective replies. |
StartTransfer | Fired when the message text starts transferring. |
Transfer | Fired while the message text gets transferred to MailServer . |
Configuration Settings
The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.
Charset | When set, the charset Content-Type attribute will be added using the specified value. |
ImageData[index] | The data for the image at the specified index. |
MessageHeadersString | String representation of RFC822-encoded headers of the message. |
MessageTextEncoding | When set, the MessageHTML and MessageText values will be encoded using the specified encoding. |
TransferText | The current portion of the message being sent. |
AttachmentEncoding[index] | Content-Transfer-Encoding for attached file (at index). |
AttachmentType[index] | Content-type for attached file (at index). |
AttachmentText[index] | Add the text into the attachment at the specified index. |
OverrideFilename | If set to true, the AttachmentName property value will be used to set the MIME part Filename attribute. |
TempFilePath | If set, the temporary files created during message creation will be put in the path specified. |
AllowEmptyTo | If set to True, then the SendTo property is not required. |
AuthorizationIdentity | The value to use as the authorization identity when SASL authentication is used. |
Charset | When set, the message headers will be encoded using the specified Charset. |
Hello | The argument for HELO (herald) command to the server (defaults to local host name). |
KeepQueue | If set to True, queued files are not deleted after a successful send. |
MaxHeaderLength | Maximum length for headers to avoid line folding (default 80). |
OtherHeaders | An RFC 822 compliant string consisting of extra headers. |
ReturnPath | Sets the Return-Path to be used for sending email. |
SendRSET | Whether to send RSET command. |
StopOnToErrors | Instructs the component to stop sending the message if the server does not acknowledge any of the TOs. |
StopOnCcErrors | Instructs the component to stop sending the message if the server does not acknowledge any of the CCs. |
StopOnBccErrors | Instructs the component to stop sending the message if the server does not acknowledge any of the BCCs. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The TCP port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
RecordLength | The length of received data records. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
UseIPv6 | Whether to use IPv6. |
TcpNoDelay | Whether or not to delay when sending packets. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
CodePage | The system code page used for Unicode to Multibyte translations. |