Internet Direct (Indy)
Home
PreviousUpNext
TIdSNPP.SendMessage Method

Sends a message to the specified pager identifier.

Pascal
procedure SendMessage(
    APagerId: String; 
    AMsg: String
);
Parameters 
Description 
APagerId 
Pager identifier for the message.
 
AMsg 
Message contents to send to the pager. 

SendMessage is a procedure used to send the specified message to the specified pager identifier using the SNPP client connection. 

APagerId is the pager identifier to receive the content of the message contained in AMsg. 

AMsg is a string representing the message to be sent to the page specified in APagerId. 

If AMsg contains either CR or LF characters, an EIdSNPPNoMultiLineMessages exception will be raised. 

SendMessage calls a protected method to send the SNPP PAGER command to submit the pager identifer in APagerId for use in the message transmission. Possible responses from the SNPP server, with suggested response text, for the PAGER command include: 

 

Code 
Message 
250 
Pager ID Accepted 
421 
Too Many Errors, Goodbye (terminate connection) 
421 
Gateway Service Unavailable (terminate connection) 
550 
Error, Invalid Pager ID 
554 
Error, failed (technical reason) 

 

If the response code is any value other than 250, an assigned OnStatus event handler will be triggered with the response text from the SNPP server. 

SendMessage calls WriteLn to send the SNPP SEND command that finalizes the current message transaction. Possible responses from the SNPP server, with suggested text, in response to a SEND command include: 

 

Code 
Message 
250 
Pager ID Accepted 
421 
Too Many Errors, Goodbye (terminate connection) 
421 
Gateway Service Unavailable (terminate connection) 
503 
Error, Pager ID or Message Incomplete 
550 
Error, Invalid Pager ID 
554 
Error, failed (technical reason) 

 

If either APagerId or AMsg contains an empty string (''), no action will be performed in the SendMessage method.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.