Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nu pize kartoju
- Mail_PHPMailerLite::AddAddress($params['to_email'], $params['to_name']);
- Mail_PHPMailerLite::MsgHTML($params['body']);
- -- istrauka is phpmailer --
- /**
- * Set the From and FromName properties
- * @param string $address
- * @param string $name
- * @return boolean
- */
- public function SetFrom($address, $name = '',$auto=1) {
- $address = trim($address);
- $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
- if (!self::ValidateAddress($address)) {
- $this->SetError($this->Lang('invalid_address').': '. $address);
- if ($this->exceptions) {
- throw new phpmailerException($this->Lang('invalid_address').': '.$address);
- }
- echo $this->Lang('invalid_address').': '.$address;
- return false;
- }
- $this->From = $address;
- $this->FromName = $name;
- if ($auto) {
- if (empty($this->ReplyTo)) {
- $this->AddAnAddress('ReplyTo', $address, $name);
- }
- if (empty($this->Sender)) {
- $this->Sender = $address;
- }
- }
- return true;
- }
Add Comment
Please, Sign In to add comment