php class Model_Contact public function send data if isset data name i

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<?php
class Model_Contact {
public function send($data)
{
if(!isset($data['name']) || !isset($data['email']) || !isset($data['message']))
return false;
$mail = new Zend_Mail('utf-8');
$mail->setBodyText('This is the text of the mail.');
$mail->setFrom('a.androschuk@bvblogic.com', 'Some Sender');
$mail->addTo('a.androschuk@bvblogic.com', 'Some Recipient');
$mail->setSubject('Форма обратной связи');
return $mail->send();
}
}