Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How Do I Check To See If PEAR Is Installed On My Server or Not?
- require_once 'Mail.php';
- $from = "me@example.com>";
- $to = "you@gmail.com>";
- $subject = "Hi!";
- $body = "Hi,nnHow are you?";
- $host = "mail.example.com";
- $username = "me";
- $password = "test";
- $headers = array ('From' => $from,
- 'To' => $to,
- 'Subject' => $subject);
- $smtp = Mail::factory('smtp',
- array ('host' => $host,
- 'auth' => true,
- 'username' => $username,
- 'password' => $password));
- $mail = $smtp->send($to, $headers, $body);
- if (PEAR::isError($mail)) {
- echo("<p>" . $mail->getMessage() . "</p>");
- } else {
- echo("<p>Message successfully sent!</p>");
- }
- require_once 'System.php';
- var_dump(class_exists('System'));
- which pear
- /usr/bin/pear
- sudo apt-get install php-pear
- sudo pear install mail
- sudo pear install Net_SMTP
- sudo pear install Auth_SASL
- sudo pear install mail_mime
Add Comment
Please, Sign In to add comment