Jump to content

smtp authentication problem


oh_boy123

Recommended Posts

hi every one,

my problem is this:

 

I have the script of this smtp authentication:

 

require_once ("email.php"); // <- Look at this, where can i get this file?

// This is my problem, all of the forums did not indicate where can you get this file, all they say is that you must have a PEAR MAIL Packages to be installed on your computer but i have uploaded mine on my host.

 

 

$from = "Sender <email.com>";

$to = "Recipient <".$email.">";

$subject = "Hi!";

$body = "This is test mail ";

 

$host = "www.theLastHostingPLAnyoullEverNeed.com";

$username = "wow";

$password = "wow";

 

$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>");

                }

 

}

 

// To all that can help i wish you a good luck. ;)

// thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/198186-smtp-authentication-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.