1

I have windows 2012 server. I have installed email server (hMailServer) which is configured and send / receive emails correctly.

But when I want send mail from php, (I have to use mail() function), nothing happen.

In php.ini i set up:

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

any idea where can be problem? Thank you

edit: I tried

auth_username = smtp-username
auth_password = smtp-password
sendmail_from = you@yourserver.com

with different smtp servers and always receive this error:

Warning: mail(): SMTP server response: 530 SMTP authentication is required. 
Tarya
  • 61
  • 1
  • 6

1 Answers1

1

hMailServer configurated use localhost? Maybe you need use SMTP authentification?

try use remote credentials like this

[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
Staff
  • 853
  • 1
  • 7
  • 10
  • I did what u said, but get error - Warning: mail(): SMTP server response: 530 SMTP authentication is required. I tried more my smtp mails, but always same error. – Tarya Jan 10 '16 at 16:28