API Reference

type SMTP_Server_Type , type Mail_Message_Type

 
   type SMTP_Server_Type is new Server with private; 
 
   type Mail_Message_Type is new Message with private; 
 

procedure Open

   procedure Open (Server   : in out SMTP_Server_Type;  
                   Host_Name : in     Unbounded_String; 
                   Port     : in     Positive); 

opens a connection the server hostname on the specified port, and sends the Helo command.

procedure Open

   procedure Open (Server : in out SMTP_Server_Type;  
                   Host_Name : in Unbounded_String); 

Opens a connection to the server at hostaname on the default port and sends the Helo command.

procedure Close , procedure Data

   procedure Close (Server : in out SMTP_Server_Type);  
 
   procedure Data (Server : in out SMTP_Server_Type; 
                   Data   : in out Mail_Message_Type'Class); 

raises: Exceeded_Storage_Allowance, Transaction_Failed, Local_Error, Insufficent_System_Storage,

Syntax_Error_Command_Unrecognised,

Syntax_Error_Invalid_Parameters_Or_Arguments, Bad_Command_Sequence and Service_Not_Available assuming a proper server implementation of SMTP.

procedure Expand

   procedure Expand (Server  : in     SMTP_Server_Type;  
                     List    : in     Unbounded_String; 
                     Users   :    out Unbounded_String); 

raises: Syntax_Error_Command_Unrecognised,

Syntax_Error_Invalid_Parameters_Or_Arguments, Command_Unimplemented, Command_Parameter_Not_Implemented, Service_Not_Available.

procedure Expn , procedure Hello

   procedure Expn (Server : in     SMTP_Server_Type;  
                   List   : in     Unbounded_String; 
                   Users  :    out Unbounded_String) 
     renames Expand; 
 
   procedure Hello (Server    : in out SMTP_Server_Type; 
                    Host_Name : in String           := 
                      GNAT.Sockets.Host_Name); 

raises: Syntax_Error_Command_Unrecognised,

Syntax_Error_Invalid_Parameters_Or_Arguments, Command_Parameter_Not_Implemented, Service_Not_Available.

procedure Helo , procedure Mail

   procedure Helo (Server    : in out SMTP_Server_Type;  
                   Host_Name : in String           := 
                      GNAT.Sockets.Host_Name) 
     renames Hello; 
 
   procedure Mail (Server       : in out SMTP_Server_Type; 
                   Reverse_Path : in     String           := 
                     Null_Path); 

raises: Insufficent_System_Storage, Local_Error,

Storage_Allowance_Exceeded, Syntax_Error_Command_Unrecognised, Syntax_Error_Invalid_Parameters_Or_Arguments, Service_Not_Available

procedure Mail , procedure NOOP

   procedure Mail (Server  : in out Smtp_Server_Type;  
                   Message : in out Mail_Message_Type'Class); 
 
   procedure NOOP (Server : in out Smtp_Server_Type); 

procedure Quit

   procedure Quit (Server : in out Smtp_Server_Type);  

procedure Recipient , procedure Rcpt , procedure Reset , procedure Rset , procedure Send , procedure Send_And_Mail , procedure Saml , procedure Send_Or_Mail , procedure Soml , procedure Turn

   procedure Recipient (Server    : in out Smtp_Server_Type;  
                        Recipient : in     Unbounded_String); 
 
   procedure Rcpt (Server    : in out Smtp_Server_Type; 
                   Recipient : in     Unbounded_String) 
     renames Recipient; 
 
   procedure Reset (Server : in out Smtp_Server_Type); 
 
   procedure Rset (Server : in out Smtp_Server_Type) 
     renames Reset; 
 
   procedure Send (Server       : in out Smtp_Server_Type; 
                   Reverse_Path : in     Unbounded_String); 
 
   procedure Send_And_Mail (Server       : in out Smtp_Server_Type; 
                            Reverse_Path : in     Unbounded_String); 
 
   procedure Saml (Server       : in out Smtp_Server_Type; 
                   Reverse_Path : in     Unbounded_String) 
     renames Send_And_Mail; 
 
   procedure Send_Or_Mail (Server       : in out Smtp_Server_Type; 
                           Reverse_Path : in     Unbounded_String); 
 
   procedure Soml (Server       : in out Smtp_Server_Type; 
                   Reverse_Path : in     Unbounded_String) 
     renames Send_Or_Mail; 
 
   procedure Turn (Server : in out Smtp_Server_Type); 

this isn't fully implemented yet, and will raise Not_Implemented after setting Success to be false.

procedure Verify

   procedure Verify (Server    : in out Smtp_Server_Type;  
                     User      : in     Unbounded_String; 
                     Full_Name :    out Unbounded_String; 
                     Mail_Box  :    out Unbounded_String); 

this isn't fully implemented yet, and will raise Not_Implemented after setting Success to be false.

procedure Vrfy

   procedure Vrfy (Server    : in out Smtp_Server_Type;  
                   User      : in     Unbounded_String; 
                   Full_Name :    out Unbounded_String; 
                   Mail_Box  :    out Unbounded_String) 
     renames Verify;