8 Replies - 2430 Views - Last Post: 12 December 2012 - 03:11 PM Rate Topic: -----

#1 DocNet  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 74
  • Joined: 11-October 12

PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 04:15 AM

Hi, i am trying to use phpmailer, but i have some error...

Error is: Language string failed to load: execute/usr/sbin/sendmail;

code is:
<?php
include_once('php/get_category.php');
include_once('php/get_slike.php');
if ($_GET['status']=="sent") {
 $status="sent";
}
if (isset($_POST['SenderName']) && isset($_POST['SenderEmail'])
 && preg_match("/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*+[a-z]{2}/is", $_POST['SenderEmail'])) {
require_once("phpmailer/class.phpmailer.php");
$SenderName = $_POST['SenderName']; 
$SenderEmail = $_POST['SenderEmail']; 
$SenderMessage = $_POST['SenderMessage'];

 // Pokretanje i obrada PHPmailer skripte
 $mail = new PHPMailer(); // using php "mail()"
 $mail->IsSendmail(); // SendMail transport
 $mail->Subject = "Poruka sa ZID2 sajta"; 
 $mail->FromName = $SenderName; 
 $mail->From = $SenderEmail; 
 $mail->Body = $SenderMessage;
 $mail->WordWrap = 50;
 $mail->IsHTML(true);
 $mail->CharSet="utf-8";
 $mail->AddAddress("srdjan.nezic@yahoo.com"); 
 // $mail->AddBCC("nenad@krojac.com"); 

 // Obrada slanja i provera
 if($status != "sent") {
 if($mail->Send()) {
 header("Location: ?status=sent");
 } else {
 $status = "Error";
 $poruka_greska="Mailer Error: " . $mail->ErrorInfo; 
 echo '<script type="text/javascript">alert('.'"'.$poruka_greska.'"'.');</script>';
 }
 }
}
?> 



site where i try to use this script is http://zid2proba.comlu.com/contact.php

so, what's wrong here?

Is This A Good Question/Topic? 0
  • +

Replies To: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3718
  • View blog
  • Posts: 5,986
  • Joined: 08-June 10

Re: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 04:50 AM

This would indicate that the sendmail binary is either not located at the specified path (/usr/sbin/sendmail), or that PHP doesn't have permission to executed it. Can you verify that the binary exists, and check what permissions are set on it?

What OS is the server running?
Was This Post Helpful? 0
  • +
  • -

#3 DocNet  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 74
  • Joined: 11-October 12

Re: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 06:35 AM

View PostAtli, on 12 December 2012 - 04:50 AM, said:

This would indicate that the sendmail binary is either not located at the specified path (/usr/sbin/sendmail), or that PHP doesn't have permission to executed it. Can you verify that the binary exists, and check what permissions are set on it?

What OS is the server running?


I don't have usr/ directory

phpmailer directory has:

DIRECTORIES:
docs
examples
language
phpdoc
test
FILES:
ChangeLog.txt
class.phpmailer.php
class.pop3.php
class.smtp.php
Was This Post Helpful? 0
  • +
  • -

#4 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3718
  • View blog
  • Posts: 5,986
  • Joined: 08-June 10

Re: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 07:00 AM

It's not a part of PHPMailer. It's the system's sendmail binary. The path the error shows is an absolute path to where your OS is meant to be keeping the sendmail. If your OS has it installed somewhere else, you need to updated the PHP config or the PHPMailer instance to reflect that. If the OS doesn't have it installed at all then you need to install it, or switch to another mail transport method, like SMTP.
Was This Post Helpful? 0
  • +
  • -

#5 DocNet  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 74
  • Joined: 11-October 12

Re: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 08:48 AM

View PostAtli, on 12 December 2012 - 07:00 AM, said:

It's not a part of PHPMailer. It's the system's sendmail binary. The path the error shows is an absolute path to where your OS is meant to be keeping the sendmail. If your OS has it installed somewhere else, you need to updated the PHP config or the PHPMailer instance to reflect that. If the OS doesn't have it installed at all then you need to install it, or switch to another mail transport method, like SMTP.


hmm but i use this on one free hosting, this is my website where i want to use phpmailer

http://zid2proba.comlu.com/contact.php
Was This Post Helpful? 0
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6058
  • View blog
  • Posts: 23,495
  • Joined: 23-August 08

Re: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 10:58 AM

Why not contact your host provider's support?
Was This Post Helpful? 1
  • +
  • -

#7 no2pencil  Icon User is offline

  • Toubabo Koomi
  • member icon

Reputation: 5247
  • View blog
  • Posts: 27,069
  • Joined: 10-May 07

Re: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 11:00 AM

Most likely your host provider isn't going to give access to the /usr/ directory.

I agree with JackOfAllTrades, the answer to this isn't going to be correcting your code, it's going to be in their configuration & what they allow you to use. You should contact your hosting provider.
Was This Post Helpful? 0
  • +
  • -

#8 DocNet  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 74
  • Joined: 11-October 12

Re: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 01:02 PM

I work this for my boss, this is just preview, boss has payed host, so i will upload site on his host when i done this site...
Was This Post Helpful? 0
  • +
  • -

#9 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3718
  • View blog
  • Posts: 5,986
  • Joined: 08-June 10

Re: PhpMailer: Language string failed to load: execute/usr/sbin/sendmail

Posted 12 December 2012 - 03:11 PM

In that case I'd recommend using SMTP instead of sendmail. It's less dependent on the host computer itself, as it can connect to external servers to deliver your mail. You can even set it up to use services like Gmail. (Given that your host isn't known for spamming or such. Google doesn't like that.) That's actually a nice trick to use during development, even though you'll probably want to switch to another SMTP server after deployment.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1