reedjasonf
Solid State Member
- Messages
- 9
Got a problem here and haven't found the solution anywhere!
Here's the situation: I have a single server computer running windows server 2003. The host is connected to the internet using a star topography, the gateway being a router connected directly to the internet and I have http port 80, smtp port 25 and pop3 port 110 all forwarded. On this host I am developing a website - works fine. I would like to set up this website to send emails using php's mail() function.
Of course, I am using windows IIS and pop3 services. I have set up my php.ini file to use localhost as smtp server on port 25 and set connection and relay settings under smtp virtual server.
I have 2 pop3 accounts setup: one for personnal use and another called "test". I am able to send and recieve messages on these accounts when using a pop3 mail reader, such as outlook, successfully. However, when I run my php test page to send a test email I don't recieve it on an external email address. I am trying to send an email to my old gmail account. My php code is here:
<?php
$to = 'my-gmail-account@gmail.com;
$subject = 'subject';
$headers = 'From: test@asubdomain.no-ip.org' . "\r\n" .'Reply-To: test@asubdomain.no-ip.org' . "\r\n" .'X-Mailer: PHP/' . phpversion();
$message = 'This is just a test message.';
$message = str_replace("\n.", "\n..", $message);
if(mail($to, $subject, $message, $headers))
echo 'Mail sent';
?>
When I run this script I don't get any error messages. I looked in my smtp log file and it reads:
#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2009-10-08 05:19:50
#Fields: time c-ip cs-method cs-uri-stem sc-status
05:19:50 127.0.0.1 HELO - 250
05:19:50 127.0.0.1 MAIL - 250
05:19:50 127.0.0.1 RCPT - 250
05:19:50 127.0.0.1 DATA - 250
05:19:50 127.0.0.1 QUIT - 240
I notice that these messages sit in the queue folder until they expire and then a message is sent to my "test" account saying that the message was not sent to the recipient (myself).
I hope I have provided enough information about my problem for a diagnosis. I need a savior here...
Here's the situation: I have a single server computer running windows server 2003. The host is connected to the internet using a star topography, the gateway being a router connected directly to the internet and I have http port 80, smtp port 25 and pop3 port 110 all forwarded. On this host I am developing a website - works fine. I would like to set up this website to send emails using php's mail() function.
Of course, I am using windows IIS and pop3 services. I have set up my php.ini file to use localhost as smtp server on port 25 and set connection and relay settings under smtp virtual server.
I have 2 pop3 accounts setup: one for personnal use and another called "test". I am able to send and recieve messages on these accounts when using a pop3 mail reader, such as outlook, successfully. However, when I run my php test page to send a test email I don't recieve it on an external email address. I am trying to send an email to my old gmail account. My php code is here:
<?php
$to = 'my-gmail-account@gmail.com;
$subject = 'subject';
$headers = 'From: test@asubdomain.no-ip.org' . "\r\n" .'Reply-To: test@asubdomain.no-ip.org' . "\r\n" .'X-Mailer: PHP/' . phpversion();
$message = 'This is just a test message.';
$message = str_replace("\n.", "\n..", $message);
if(mail($to, $subject, $message, $headers))
echo 'Mail sent';
?>
When I run this script I don't get any error messages. I looked in my smtp log file and it reads:
#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2009-10-08 05:19:50
#Fields: time c-ip cs-method cs-uri-stem sc-status
05:19:50 127.0.0.1 HELO - 250
05:19:50 127.0.0.1 MAIL - 250
05:19:50 127.0.0.1 RCPT - 250
05:19:50 127.0.0.1 DATA - 250
05:19:50 127.0.0.1 QUIT - 240
I notice that these messages sit in the queue folder until they expire and then a message is sent to my "test" account saying that the message was not sent to the recipient (myself).
I hope I have provided enough information about my problem for a diagnosis. I need a savior here...