Send a message.
public send ( mixed $from, mixed $to, mixed $data, array $opts = [] ) : array | ||
$from | mixed | The from address. Either a Horde_Mail_Rfc822_Address object or a string. |
$to | mixed | The to (recipient) addresses. Either a Horde_Mail_Rfc822_List object, a string, or an array of addresses. |
$data | mixed | The data to send. Either a stream or a string. |
$opts | array | |
return | array | If no receipients were successful, a Horde_Smtp_Exception will be thrown. If at least one recipient was successful, an array with the following format is returned: (@since 1.5.0) - KEYS: Recipient addresses ($to addresses). - VALUES: Boolean true (if message was accepted for this recpieint) or a Horde_Smtp_Exception (if messages was not accepted). |