0

I would like to use the following the following:

<?php

$to = "sgregory@superdoom.co.za";
$subject = "My Subject";
$txt = "Hello Work";
$headers = "From: peter@superdoom.co.za" ."\r\n" .
"CC:sdanisa@superdoom.com";

mail($to, $subject,$txt,$headers);
?>

The following settings are

[mail function]
; For Win32 only.

; http://php.net/smtp

SMTP = 172.xx.xx.xx

; http://php.net/smtp-port

smtp_port = 25

; For Win32 only.

; http://php.net/sendmail-from

;sendmail_from = sdanisa@superdoom.com

The above script and php.ini configurations resides in Server A, which in the DMZ and it does not have internet connection. I did some research and found out that I need to create a mail server on the Server A which is in the DMZ. Therefore I installed hmailserver.enter image description here

Server B is a IBM Domino server, which I would like to use to send email.

Regardless of the changes I made, I still get the following common error:

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\mail\index.php on line 12
Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
kya
  • 1,798
  • 8
  • 35
  • 61

1 Answers1

0

Make sure that SMTP is running on the IBM Domino server (and that it accepts connections from server A). Maybe this question and the answers can help: How to send email in lotus notes using PHP

Community
  • 1
  • 1
Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
  • 2
    The easiest way to test the things that @Per Henrik has mentioned is to log into a shell on the machine where your PHP is running, and use telnet to try to connect to port 25 on the IP address of the Domino server. If you get a connection, try to open an SMTP session with the EHLO command, then try manually sending a message using the MAIL FROM, RCPT TO, and DATA commands. See here: http://technet.microsoft.com/en-us/library/aa995718(v=exchg.65).aspx – Richard Schwartz Apr 17 '14 at 15:53