oh_boy123 Posted April 11, 2010 Share Posted April 11, 2010 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 More sharing options...
teamatomic Posted April 11, 2010 Share Posted April 11, 2010 Go here: http://phpmailer.worxware.com/ and grab the phpMailer, it has good example files including authentication. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/198186-smtp-authentication-problem/#findComment-1039910 Share on other sites More sharing options...
oh_boy123 Posted April 12, 2010 Author Share Posted April 12, 2010 Thank you very much good one, I have not yet tried it but looks like this is the solution to my problem. Link to comment https://forums.phpfreaks.com/topic/198186-smtp-authentication-problem/#findComment-1040212 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.