jintot Posted February 2, 2008 Share Posted February 2, 2008 Good day experts! I got this php code include 'phpmailer/class.phpmailer.php'; include 'phpmailer/class.smtp.php'; $mail= new PHPMailer; $mail->IsSMTP(); // send via SMTP $mail->SMTPAuth = true; // turn on SMTP authentication $mail->Host = "smtp.mail.yahoo.com"; $mail->Port = "25"; $mail->Username = "xxx@yahoo.com"; // SMTP username $mail->Password = "xxxxx"; // SMTP password $webmaster_email = "xxx@yahoo.com"; //Reply to this email ID $email="xxx@gmail.com"; // Recipients email ID $name="name"; // Recipient's name $mail->From = $webmaster_email; $mail->FromName = "Webmaster"; $mail->AddAddress($email,$name); $mail->AddReplyTo($webmaster_email,"Webmaster"); $mail->WordWrap = 50; // set word wrap $mail->IsHTML(true); // send as HTML $mail->Subject = "This is the subject"; $mail->Body = "Hi, This is the HTML BODY "; //HTML Body $mail->AltBody = "This is the body when user views in plain text format"; //Text Body if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message has been sent"; } when i executed it, the error says : Mailer Error: Language string failed to load: connect_host all xxx are just dummy for this post... and i'm going to use yahoo as my smtp server. what do you think is problem? thanks! Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 2, 2008 Share Posted February 2, 2008 This part of the error message - "Language string failed to load" means that you did not copy the "language" folder that is part of the phpmailer script to your server. Once you put the language folder on the server, the error message will output as - SMTP Error: Could not connect to SMTP host. This means that the host name/port is incorrect. The correct settings should be - Outgoing Mail (SMTP) Server: smtp.mail.yahoo.com (Use SSL, port: 465, use authentication) If this does not work, that would mean that the port is probably blocked, either by some firewall software on your server, by your hosting company, by your router, or by your ISP. You would need to provide more information about where your php script is running and how it is connected to the Internet to get more specific help. Quote Link to comment Share on other sites More sharing options...
jintot Posted February 4, 2008 Author Share Posted February 4, 2008 sir thanks for the information! but in this case, i have the language folder of the phpmailer script.. should i include it in my mailer script or require it? thanks! Quote Link to comment Share on other sites More sharing options...
djbuddhi Posted March 11, 2008 Share Posted March 11, 2008 in the php.ini set the smtp for email , then it will works Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.