Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodTsmCustomSMTPClient.TryMailFrom

function TryMailFrom(const aFrom: string): Integer;
MAIL FROM:<aFrom> AND NOTHING AFTER IT, so a deployment can ask "would this server take mail from this sender" without submitting a message. Returns that reply's code; resets the transaction (RSET, best effort) whatever the code; never sends RCPT or DATA. A NEGATIVE REPLY IS RETURNED, NOT RAISED - the question is what the code is, and an exception would make the ordinary answer the exceptional path; a transport failure still raises. The preconditions are SendMail's (the session open, the RequireTLS gate) and a control character in aFrom is refused before anything is sent. LastReplyCode and LastReplyText afterwards describe the RSET, not the refusal.