Closed Thread
Results 1 to 5 of 5

Thread: Could not execute: /usr/sbin/sendmail

  1. #1
    johnbagtas65 is offline x10Hosting Member johnbagtas65 is an unknown quantity at this point
    Join Date
    Nov 2010
    Location
    I'm behind you.
    Posts
    4

    Exclamation Could not execute: /usr/sbin/sendmail

    Hi!
    I have searched the forum for my problem, but I can't find an answer for my prob.
    Maybe I haven't searched enough but my prob is simple..

    I am using PHPmailer. and tried to send an email to my gmail account.
    but i got this error:
    Could not execute: /usr/sbin/sendmail


    I am using gmail SMTP. can you enlighten me about this topic? Thank you!

  2. #2
    descalzo's Avatar
    descalzo is online now Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,633

    Re: Could not execute: /usr/sbin/sendmail

    Do you have code we can look at? ( **** out passwords or other sensitive info).
    Are you are saying that you are using SMTP through your Google Apps account?
    Nothing is always absolutely so.

  3. #3
    johnbagtas65 is offline x10Hosting Member johnbagtas65 is an unknown quantity at this point
    Join Date
    Nov 2010
    Location
    I'm behind you.
    Posts
    4

    Unhappy Re: Could not execute: /usr/sbin/sendmail

    Code:
    function emailsend($to,$from,$subject,$mensahe)
    {
            
        try 
        {
            $mail = new PHPMailer(true); //New instance, with exceptions enabled
    
            //$body             = file_get_contents('contents.html');
            $body             = preg_replace('/\\\\/','', $mensahe); //Strip backslashes
    
            $mail->IsSMTP();                           // tell the class to use SMTP
            $mail->SMTPAuth   = true;                  // enable SMTP authentication
            $mail->Port       = 25;                    // set the SMTP server port
            $mail->Host       = "ssl://smtp.gmail.com"; // SMTP server
            $mail->Username   = "mymail@gmail.com";     // SMTP server username
            $mail->Password   = "mypassword";            // SMTP server password
    
            $mail->IsSendmail();  // tell the class to use Sendmail
    
            $mail->AddReplyTo("mymail@gmail.com","First Last");
    
            $mail->From       = "no_reply@ravenresort.co.nr";
            $mail->FromName   = "Admin Raven Resort";
    
            $tos = "$to";
    
            $mail->AddAddress($tos);
    
            $mail->Subject  = "$subject";
    
             $mail->AltBody    = "To view the message, please use an HTML  compatible email viewer!"; // optional, comment out and test
            $mail->WordWrap   = 80; // set word wrap
    
            $mail->MsgHTML($body);
    
            $mail->IsHTML(true); // send as HTML
    
            $mail->Send();
            //echo 'Message has been sent.';
        }
        catch (phpmailerException $e)
        {
            echo $e->errorMessage();
        }
    
    
    
    }
    This is my code. =[
    In my other host, it works. But then when I transferred here at x10, it returned the error.
    Im using Google's SMTP. I'm not sure if it's google app, but it's in my Gmail's settings. in the POP tab.
    Last edited by johnbagtas65; 02-13-2011 at 10:47 PM.

  4. #4
    descalzo's Avatar
    descalzo is online now Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,633

    Re: Could not execute: /usr/sbin/sendmail

    Quote Originally Posted by johnbagtas65 View Post
    Code:
            $mail->IsSendmail();  // tell the class to use Sendmail
    Remove that line and adjust/add:


    Code:
        $mail->SMTPSecure = "ssl";  
        $mail->Host       = "smtp.gmail.com"; 
        $mail->Port       = 465;
    Nothing is always absolutely so.

  5. #5
    johnbagtas65 is offline x10Hosting Member johnbagtas65 is an unknown quantity at this point
    Join Date
    Nov 2010
    Location
    I'm behind you.
    Posts
    4

    Red face Re: Could not execute: /usr/sbin/sendmail

    Superb! Thank you very much!!

    PROBLEM SOLVED.

Closed Thread

Similar Threads

  1. Space can not execute PHP, ASP?
    By skyshoumm25 in forum Free Hosting
    Replies: 0
    Last Post: 08-29-2010, 01:14 AM
  2. Can't execute SQL
    By samsungflashwiki in forum Free Hosting
    Replies: 8
    Last Post: 08-10-2010, 03:06 PM
  3. Perl Sendmail Problem -- sendmail config
    By adrenlinerush in forum Free Hosting
    Replies: 4
    Last Post: 12-06-2007, 09:50 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers