Bitrix Site Manager

CForumPrivateMessage::Send

int
Send(
 array arFields 
);

The Send method creates a message with parameters specified in the arFields array.

Parameters

ParameterDescription
arFields An array of the format Array(field1=>value1[, field2=>value2 [, ..]]):
  • field - field name;
  • value - field value.
The fields are listed in the Private message table. The required fields must be present.

Return Values

The method returns the ID of the created message on success, or false otherwise.

See Also

Private message table

Example



<?
$arFields = Array(
	AUTHOR_ID    - > $AUTHOR_ID,
	POST_DATE    - > $POST_DATE,   
	POST_SUBJ    - > $POST_SUBJ,   
	POST_MESSAGE - > $POST_MESSAGE,
	USER_ID      - > $USER_ID,     
	FOLDER_ID    - > 1,   
	IS_READ      - > "N",     
	USE_SMILES   - > ($USE_SMILES=="Y") ? "Y" : "N",
	AUTHOR_NAME  - > $AUTHOR_NAME 
);
$ID = CForumPrivateMessage::Send($arFields);
if (IntVal($ID)<=0)
  echo "Error!";
?>