email - Really weird Php Mail::factory Issue -


i have weird issue troubled , not know how fix it!

sample code used here wroks , sends me email correctly!

<?php require_once "mail.php";  $from = "web master <contact@sample.com>"; $to = "bob <sample@sample.com>"; $subject = "test email using php smtp\r\n\r\n"; $body = "this test email message";  $host = "mail.emailsrvr.com"; $username = "sample@sample.com"; $password = "11111";  $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 sent!</p>"); } ?> 

but when put code email password reminder php code stops working! have put code @ front or @ place u click send button trigger, nothing works , have no idea why! funny part had working if copy in parts of code , works first 1 or 2 email , stops working after...

the code comes before reminder.php before email script below

<?php ini_set("display_errors","1"); ini_set("display_startup_errors","1"); if(get_magic_quotes_runtime()) {     set_magic_quotes_runtime(false); }  include("include/dbcommon.php");  $cemailfield = "email"; $reminded=false; $strsearchby="username";  include('libs/smarty.class.php'); $smarty = new smarty();  $strusername=""; $stremail=""; $strmessage="";  $conn=db_connect(); //  before process event if(function_exists("beforeprocessremindpwd"))     beforeprocessremindpwd($conn); 

please ! if have idea on solution this?

mail("sample@sample.com","test email","test body here"); 

check if works?


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo