SendToRaw function

function SendToRaw(Const MailFrom, MailTo, 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. Send maildata (text of e-mail with SMTP headers!) from "MailFrom" e-mail address to "MailTo" e-mail address (If you need more then one receiver, then separate their addresses by comma).

Function sends e-mail to a SMTP server defined in "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 e-mail message is successfully sent, the result returns true.

If you need use different port number then standard, then add this port number to SMTPhost after colon. (i.e. '127.0.0.1:1025')