Ver Mensaje Individual
  #7 (permalink)  
Antiguo 19/12/2012, 14:54
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Enviar correos desde localhost

Cita:
Iniciado por jandrogdz Ver Mensaje
asi es en windows
Descargá sendmail desde aqui
http://glob.com.au/sendmail/

descomprimi el ejecutable en una carpeta, ej C:\sendmail

luego, es php.ini, en la sección mail

[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 = [email protected]

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

la linea en negritas es la ruta en la que descomprimiste el ejecutable
luego, en esa carpeta vas a encontrar un archivo llamado sendmail.ini, completalo con los valores requeridos, te dejo el mio de ejemplo



Código INI:
Ver original
  1. ; configuration for fake sendmail
  2.  
  3. ; if this file doesn't exist, sendmail.exe will look for the settings in
  4. ; the registry, under HKLM\Software\Sendmail
  5.  
  6. [sendmail]
  7.  
  8. ; you must change mail.mydomain.com to your smtp server,
  9. ; or to IIS's "pickup" directory.  (generally C:\Inetpub\mailroot\Pickup)
  10. ; emails delivered via IIS's pickup directory cause sendmail to
  11. ; run quicker, but you won't get error messages back to the calling
  12. ; application.
  13.  
  14. smtp_server=smtp.gmail.com
  15. ; smtp port (normally 25)
  16.  
  17. smtp_port=465
  18. ;smtp_port=25
  19.  
  20. ; SMTPS (SSL) support
  21. ;   auto = use SSL for port 465, otherwise try to use TLS
  22. ;   ssl  = alway use SSL
  23. ;   tls  = always use TLS
  24. ;   none = never try to use SSL
  25.  
  26. smtp_ssl=auto
  27. ;smtp_ssl=none
  28.  
  29. ; the default domain for this server will be read from the registry
  30. ; this will be appended to email addresses when one isn't provided
  31. ; if you want to override the value in the registry, uncomment and modify
  32.  
  33. default_domain=gmail.com
  34. ; log smtp errors to error.log (defaults to same directory as sendmail.exe)
  35. ; uncomment to enable logging
  36.  
  37. error_logfile=error.log
  38.  
  39. ; create debug log as debug.log (defaults to same directory as sendmail.exe)
  40. ; uncomment to enable debugging
  41.  
  42. debug_logfile=debug.log
  43.  
  44. ; if your smtp server requires authentication, modify the following two lines
  45.  
  46. auth_username=[email protected]
  47. auth_password=tuclave
  48.  
  49.  
  50.  
  51. ; if your smtp server uses pop3 before smtp authentication, modify the
  52. ; following three lines.  do not enable unless it is required.
  53.  
  54. ;pop3_server=
  55. ;pop3_username=
  56. ;pop3_password=
  57.  
  58. ; force the sender to always be the following email address
  59. ; this will only affect the "MAIL FROM" command, it won't modify
  60. ; the "From: " header of the message content
  61.  
  62. ;force_sender=
  63.  
  64. ; force the sender to always be the following email address
  65. ; this will only affect the "RCTP TO" command, it won't modify
  66. ; the "To: " header of the message content
  67.  
  68. ;force_recipient=
  69.  
  70. ; sendmail will use your hostname and your default_domain in the ehlo/helo
  71. ; smtp greeting.  you can manually set the ehlo/helo name if required
  72.  
  73. hostname=gmail.com

en mi caso, que uso gmail, tengo habilitado el puerto 465 para smtp, ya que usa ssl.
Para finalizar la clase phpMailer viene con una carpeta de ejemplos, testeá con alguno de ellos

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.