Question

I have problem i use xampp . i want check mail form but i can't see any result . i config Mercury/32 like this tutorial in this site :

http://system66.blogspot.com/2010/01/how-to-send-mail-from-localhost-with.html

i check email by outlook it's work . i check send mail by Mercury send mail in admin panel and it's correctly work .

but i can't send email and can not recive this email by outlook when i use mail php function .

why ?

please help me

No correct solution

OTHER TIPS

I got it . i set this config and now i can recieve my sent email in outlook:

I just need to configure D:\xampp\sendmail\sendmail.ini By default, it contains the line

smtp_server=mail.mydomain.com

I had to change it to

smtp_server=localhost

No need to configure this in the older versions of XAMPP. The correct configuration for [mail function] in D:\xampp\php\php.ini is

; XAMPP: Comment out this if you want to work with an SMTP Server like Mercury SMTP = 127.0.0.1 smtp_port = 25

; XAMPP IMPORTANT NOTE (1): If XAMPP is installed in a base directory with spaces (e.g. c:\program filesD:\xampp) fakemail and mailtodisk do not work correctly. ; XAMPP IMPORTANT NOTE (2): In this case please copy the sendmail or mailtodisk folder in your root folder (e.g. C:\sendmail) and use this for sendmail_path.

; XAMPP: Comment out this if you want to work with fakemail for forwarding to your mailbox (sendmail.exe in the sendmail folder) sendmail_path = "\"D:\xampp\sendmail\sendmail.exe\" -t"

; XAMPP: Comment out this if you want to work with mailToDisk, It writes all mails in the D:\xampp\mailoutput folder ; sendmail_path ="D:\xampp\mailtodisk\mailtodisk.exe"

Now, I'm receiving mails in my inbox. Please note that "D:\xampp\" is my XAMPP installation path.

Thanks to all friends

For this you need to call your ISP and ask them for the smtp out server address. Once done, You need to configure you SMTP settings in C:xampp\php\php.ini file or you can add the following line at the beginning of your php script.

ini_set("SMTP","yoursmtpoutgoingserver");

You have to set your SMTP server settings in the php.ini file

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

if you don't run a mailserver locally, you will need to access a remote one like your isp or gmail

[mail function]
; For Win32 only.
SMTP = mail.yourserver.com
smtp_port = 25
auth_username = smtp-username
auth_password = smtp-password
sendmail_from = you@yourserver.com

This works for me, hope it will help you:

  1. Edit your php.ini (xampp\php\php.ini). Search for [mail function] and change these parameters accordingly.
  2. SMTP = smtp.gmail.com
  3. smtp_port = 587
  4. sendmail_from = [your_gmail_username]@gmail.com Note: this gmail account will be used to send the email
  5. sendmail_path = “\”D:\xampp\sendmail\sendmail.exe\” -t” Note: I did install my xampp at D:\xampp
  6. Edit your sendmail.ini (xampp\sendmail\sendmail.ini)

Comment the “Mercury” and “A free mail service example” contents as shown below:
# Mercury
#account Mercury
#host localhost
#from postmaster@localhost
#auth off
# A freemail service
#account Hotmail
#tls on
#tls_certcheck off
#host smtp.live.com
#from [exampleuser]@hotmail.com
#auth on
#user [exampleuser]@hotmail.com
#password [examplepassword]

  1. Add the account through which you want to send your mails. In my example I have configured the Gmail account as shown below:
    1. account Gmail
  2. tls on
  3. tls_certcheck off
  4. host smtp.gmail.com
  5. from [your_gmail_username]@gmail.com
  6. auth on
  7. user [your_gmail_username]@gmail.com
  8. password [your_gmail_password]
  9. port 587

    1. Set the default account to Gmail as shown below:

    account default : Gmail

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top