Unit

ScSMTPClient

 

Description

The TScSMTPClient component implements functionality of the SMTP/SMTPS client.

The SMTP protocol is used to send email messages to recipients through the SMTP server.

The SMTP client supports data transfer over a secure TLS/SSL channel (the SMTPS protocol). You use the TLSMode property to manage security.

 

To send a message using the SMTP protocol you create a TScMailMessage object and set the sender and recipient addresses in the From, Sender, ToAddress, CC, Bcc, ReplyTo properties.

The message body is set in the Body property, and the required Internet headers are set in the Headers property. You can also set the charset in the ContentCharset property to encode Body, and transfer encoding in the ContentTransferEncoding property. To add attached objects you use the Attachments collection.

To send a message you call the TScSMTPClient.Send method. You can also set the subject, body, sender, and recipient directly as overloaded parameters in the TScSMTPClient.Send method.

 

The TScSMTPClient class throws an EScSMTPError exception when an error occurs during execution of any command on the SMTP server.

 

See Also

Active

IsSecure

Send

TScMailMessage

 

SecureBridge Components, Copyright © 2007-2024 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support