Programación Web y Scripting > PHP

 mail() significado de este error

(1/2) > >>

cesand:
hola gente

configure mercury para enviar un mail por SMTP al parecer eso quedo bien ya que desde mercury en file/send mail message puedo enviar mail a mi hotmail.. pero intento desde un simple codigo con la funcion mail()
y me tira este error

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:xampphtdocspracticasmail.php on line 6

mi php.ini esta asi

[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = postmaster@localhost

que puede ser gente desde ya mil gracias pense iva andar venia todo bien y me fallo  :wacko: espero me den una mano
suerte

locazopro:
tienes que declarar el sendmail_from en tu php.ini, lo tienes como el postmaster@localhost, pero en el archivo tienes que quitar el ";" para que reconozca y defina el dato.

cesand:
Muchas gracias locazo..

pero sabes qu me continua con el mismo erro :oops: lo deje asi  al php.ini


[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
  sendmail_from = postmaster@localhost

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path = ""C:xamppsendmailsendmail.exe" -t"

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =

hice lo que me dijiste verdad?

muestro el mini script que estoy usando para ver si funciona.


--- Código: PHP ---<?php if(isset($_POST['cargar'])){$asunto = $_POST['asunto'];$sms = $_POST['mensaje'];$mail = mail(echo "se envio correctamente el mail";exit;    } else {            echo "no se pudo enviar el mail";            exit;                }}?><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>MAIL MERCURY</title></head> <body><FORM action="mail.php" method="post"><table width="30%"  border="1" cellspacing="0" cellpadding="0">  <tr>    <td>Remitente</td>    <td><input type="text" name="remitente"></td>  </tr>  <tr>    <td>Asunto</td>    <td><input type="text" name="asunto"></td>  </tr>  <tr>    <td>Mensaje</td>    <td><textarea name="mensaje" cols="15" width="60"> </textarea></td></td>  </tr>    <tr>    <td colspan="2"><input type="submit" name="cargar" value="enviar"></td>  </tr></table>  </FORM></body></html>  
espero me puedas dar otra ayuda voy a estar esperando..

saludos

F_Tanori:
cambia el dominio a que sea diferente de localhost

--- Citar ---sendmail_from = http://www.desarrolloweb.com/articulos/969.php

Saludos
--- Fin de la cita ---

cesand:
muchAS GRACIASSS por las ayudas, al parecer algo se soluciono pero aparecio un error diferente despues que pose el FROM
ES ESTE:


Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:xampphtdocspracticasmail.php on line 6

voy a mirar el link que me dejaste f_tanori a ver si lo resulvo.
saludos gente

Navegación

[0] Índice de Mensajes

[#] Página Siguiente

Ir a la versión completa