-1

tengo este error que puedo hacer no puedo enviar un mensaje a gmail por php windows

Could not execute: /usr/sbin/sendmail

-language: php
php:
  - 7.0
  - 5.6
  - 5.5
  - 5.4
  - 5.3
  - hhvm

matrix:
  allow_failures:
    - php: hhvm

before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -y -qq postfix
before_script:
  - sudo service postfix stop
  - smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 &
  - mkdir -p build/logs
  - cd test
  - cp testbootstrap-dist.php testbootstrap.php
  - chmod +x fakesendmail.sh
  - sudo mkdir -p /var/qmail/bin
  - sudo cp fakesendmail.sh /var/qmail/bin/sendmail
  - sudo cp fakesendmail.sh /usr/sbin/sendmail
  - echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' > $(php --ini|grep -m 1 "ini files in:"|cut -d ":" -f 2)/sendmail.ini
script:
  - phpunit --configuration ../travis.phpunit.xml.dist
after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml

estas son las paginas donde esta el error

 public $Sendmail = '/usr/sbin/sendmail';






public function isSendmail()
    {
        $ini_sendmail_path = ini_get('sendmail_path');

        if (!stristr($ini_sendmail_path, 'sendmail')) {
            $this->Sendmail = '/usr/sbin/sendmail';
        } else {
            $this->Sendmail = $ini_sendmail_path;
        }
        $this->Mailer = 'sendmail';
    }






public function testMailSend()
    {
        $sendmail = ini_get('sendmail_path');
        //No path in sendmail_path
        if (strpos($sendmail, '/') === false) {
            ini_set('sendmail_path', '/usr/sbin/sendmail -t -i ');
        }
        $this->Mail->Body = 'Sending via mail()';
        $this->buildBody();

        $this->Mail->Subject = $this->Mail->Subject . ': mail()';
        $this->Mail->isMail();
        $this->assertTrue($this->Mail->send(), $this->Mail->ErrorInfo);
        $msg = $this->Mail->getSentMIMEMessage();
        $this->assertNotContains("\r\n\r\nMIME-Version:", $msg, 'Incorrect MIME headers');
    }
2

1 respuesta 1

0

Ojalá te ayude en algo, si tienes XAMPP instalado en tu PC y quieres enviar desde tu localhost emails, quizas no configuraste el archivo xampp\sendmail\sendmail.ini Ahi te pide los datos de tu SMTP del servidor de salida (importante para poder enviar correos)

Archivo sendmail.ini EJ.

[sendmail]

; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory.  (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
; run quicker, but you won't get error messages back to the calling
; application.

smtp_server=TU.SMTP <---aqui tu SMTP (PUEDE SER mail.tudominio.com)

; smtp port (normally 25)

smtp_port=25   <---aqui tu puerto (por defecto es 25)

; SMTPS (SSL) support
;   auto = use SSL for port 465, otherwise try to use TLS
;   ssl  = alway use SSL
;   tls  = always use TLS
;   none = never try to use SSL

smtp_ssl=auto

; the default domain for this server will be read from the registry
; this will be appended to email addresses when one isn't provided
; if you want to override the value in the registry, uncomment and modify

;default_domain=TUDOMINIO.com

; log smtp errors to error.log (defaults to same directory as sendmail.exe)
; uncomment to enable logging

error_logfile=error.log

; create debug log as debug.log (defaults to same directory as sendmail.exe)
; uncomment to enable debugging

;debug_logfile=debug.log

; if your smtp server requires authentication, modify the following two lines

[email protected]   <---aqui tu email
auth_password=TUPASSWORD   <---aqui tu clave

////

También trata de ver que estén activadas las extensiones SMTP, IMAP, en tu php.ini y httpd.conf, colocándole las opciones de correo, (que debe ser un correo válido en un servidor tipo hostgator, bluehost, godaddy, etc)

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.