Ben smpt sunucusu olarak localhost Windows Vista m / c...using gmail üzerinde XAMPP kullanıyorum
Ben basit bir PHP komut dosyası kullanarak bir e-posta göndermek için çalışıyorum
Burada sendmail.ini üzerindeki yapılandırma ayrıntıları (Ben bu dizinde sendmail.exe ve diğer 2 dll var) olduğunu
smtp_server=smtp.gmail.com ; smtp port (normally 25)
smtp_port = 465.
; 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 = localhost
; 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
; SMTP sunucusu kimlik doğrulaması gerektiriyorsa, aşağıdaki iki satırı değiştirin
auth_username=xxxxxxx auth_password=xxxxxx
hostname = localhost
ve ben php.ini değişti
[mail function] ; For Win32 only. ;SMTP = localhost ;smtp_port = 25
; For Win32 only. ;sendmail_from = xxxxx
; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = "C:\xampp\sendmail\sendmail.exe -t"
and Once I call the script it goes into waiting...for localhost... here is the debug.log...
09/05/02 17:34:41 ** --- MESSAGE BEGIN --- 09/05/02 17:34:41 ** To: xxx@yahoo.com 09/05/02 17:34:41 ** Subject: Form Submission Results 09/05/02 17:34:41 ** From: My Web Site 09/05/02 17:34:41 ** Reply-To: xxx@gmail.com 09/05/02 17:34:41 ** 09/05/02 17:34:41 ** Name: xxx 09/05/02 17:34:41 ** E-Mail: xxx@yahoo.com 09/05/02 17:34:41 ** Message: hey test message 09/05/02 17:34:41 ** 09/05/02 17:34:41 ** 09/05/02 17:34:41 ** --- MESSAGE END --- 09/05/02 17:34:41 ** Connecting to smtp.gmail.com:465 09/05/02 17:34:41 ** Connected.
I am new to PHP and would like to know if there is a better way to do mail...I am not in for HTML/multipart mails with attachment now... Also i should be able to test in localhost without SMTP server installed . I would like to use GMAIL for now testing. THnks