Guest User

Untitled

a guest
Nov 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. nu pize kartoju
  2.  
  3. Mail_PHPMailerLite::AddAddress($params['to_email'], $params['to_name']);
  4. Mail_PHPMailerLite::MsgHTML($params['body']);
  5.  
  6.  
  7. -- istrauka is phpmailer --
  8.  
  9.  
  10.  
  11. /**
  12. * Set the From and FromName properties
  13. * @param string $address
  14. * @param string $name
  15. * @return boolean
  16. */
  17. public function SetFrom($address, $name = '',$auto=1) {
  18. $address = trim($address);
  19. $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
  20. if (!self::ValidateAddress($address)) {
  21. $this->SetError($this->Lang('invalid_address').': '. $address);
  22. if ($this->exceptions) {
  23. throw new phpmailerException($this->Lang('invalid_address').': '.$address);
  24. }
  25. echo $this->Lang('invalid_address').': '.$address;
  26. return false;
  27. }
  28. $this->From = $address;
  29. $this->FromName = $name;
  30. if ($auto) {
  31. if (empty($this->ReplyTo)) {
  32. $this->AddAnAddress('ReplyTo', $address, $name);
  33. }
  34. if (empty($this->Sender)) {
  35. $this->Sender = $address;
  36. }
  37. }
  38. return true;
  39. }
Add Comment
Please, Sign In to add comment