sendmail OnResponse event
Return to Introduction  Previous page  Next page
Applies to
acSendMail component.  

Declaration
type  
  TacSMTPResponseEvent = procedure(Sender: TObject; Code: Integer; const Response: Stringof object;  
 
property OnResponse: TacSMTPResponseEvent;  

Description
The OnResponse event occurs every time when component receives the response for SMTP request from server. The response contains the status information (code and optional text) of request.  
 
For more information about status codes of SMTP protocol see RFC 821.  

Example
procedure TForm1.acSendMail1Response(Sender: TObject; Code: Integer;  
  const Response: string);  
begin  
  with ListView1 do // status view  
   begin  
    Items.Add(Response);  
    ItemIndex := Items.Count - 1;  
   end;  
end;  

See also
OnSMTPError, OnSuccess and OnProgress events.