SendToEx function
function SendToEx(Const MailFrom, MailTo, Subject, SMTPHost: string; Const MailData: Tstrings; Const Username, Password: string): Boolean;
Unit
SMTPsend
Description
A very useful function and example of its use would be found in the TSMTPsend object. Sends "MailData" (text of e-mail without any SMTP headers!) from "MailFrom" e-mail address to "MailTo" e-mail address (There can be only ONE e-mail address, multiple receivers are not supported!).
This function sends the e-mail to the SMTP server defined in the "SMTPhost" parameter. Username and password are used for authorization to the "SMTPhost". If you dont want authorization, set "Username" and "Password" to empty strings. If the e-mail message is successfully sent, the result will be TRUE.