HOW TO send emails with PHP script using mail() function
02-27-2015, 06:23 AM
(This post was last modified: 02-27-2015, 06:25 AM by Miow5.)
And here it is, the resume of the Sentora PHP send mail adventure.
So you guys, if you have a PHP contact form in one of your websites hosted in SENTORA for Windows and you are having problems with it, just try the following solution:
Edit PHP.ini
This will not affect the hMailServer/SENTORA email accounts
Of course that you'll need to open all the relevant ports and probably also to create an inbound/outbound rule for SENTORA in Windows Firewall.
How about to put them all together?
Ports: 20-21, 25, 56, 80, 110, 143, 443, ...
So you guys, if you have a PHP contact form in one of your websites hosted in SENTORA for Windows and you are having problems with it, just try the following solution:
Edit PHP.ini
Code:
[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 = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
;sendmail_path = "C:/Sentora/bin/sendmail/sendmail.exe -t"
This will not affect the hMailServer/SENTORA email accounts
Of course that you'll need to open all the relevant ports and probably also to create an inbound/outbound rule for SENTORA in Windows Firewall.
How about to put them all together?
Ports: 20-21, 25, 56, 80, 110, 143, 443, ...