SHARE
TWEET

Untitled

a guest Sep 4th, 2018 110 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. How Do I Check To See If PEAR Is Installed On My Server or Not?
  2. require_once 'Mail.php';
  3.  
  4. $from = "me@example.com>";
  5.  
  6. $to = "you@gmail.com>";
  7. $subject = "Hi!";
  8. $body = "Hi,nnHow are you?";
  9.  
  10. $host = "mail.example.com";
  11.  
  12. $username = "me";
  13. $password = "test";
  14.  
  15. $headers = array ('From' => $from,
  16.   'To' => $to,
  17.   'Subject' => $subject);
  18.  
  19. $smtp = Mail::factory('smtp',
  20.   array ('host' => $host,
  21.     'auth' => true,
  22.     'username' => $username,
  23.     'password' => $password));
  24. $mail = $smtp->send($to, $headers, $body);
  25.  
  26. if (PEAR::isError($mail)) {
  27.   echo("<p>" . $mail->getMessage() . "</p>");
  28.  } else {
  29.   echo("<p>Message successfully sent!</p>");
  30.  }
  31.    
  32. require_once 'System.php';
  33. var_dump(class_exists('System'));
  34.    
  35. which pear
  36.    
  37. /usr/bin/pear
  38.    
  39. sudo apt-get install php-pear
  40.  
  41. sudo pear install mail
  42.  
  43. sudo pear install Net_SMTP
  44.  
  45. sudo pear install Auth_SASL
  46.  
  47. sudo pear install mail_mime
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top