As title mentions, I'm able to telnet to my web server with port 25.
But the problem is, this simple code here does not send email out. The output stated that it got sent out but there is no indication of email received.
$to = "mycompanyemail@company.com";
$subject = "test";
$msg = "Ite!";
$headers = "From: mycompanyemail@company.com
Reply-To: mycompanyemail@company.com";
mail("$to", "$subject", "$msg", "$headers");
echo "finished!";
echo "Your mail was sent.";
As following shows my php.ini file configuration
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = smtp.realtest.com
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = mycompanyemail@company.com
I've been stucked in this dire situation for two weeks and as per previous topic, there has been no help and offer, I really need this to be up and going. Thank you guys. Sorry for my inexperience effort.
On another side note, I realized how is it possible to send email from an email address if there is no authentication needed? Please answer my clarifications, thanks alot.
You might try these links http://roshanbh.com.np/2007/12/sending-e-mail-from-localhost-in-php-in-windows-environment.html and http://php.net/manual/en/ref.mail.php (you'll find can also use sendmail on windows ;) )
Also the e-mail address specified for sendmail_from
must exist on the SMTP server, and make sure the IP of the computer you are running the script on is trusted by the SMTP server, so it does not ask for authentication or encryption.
And don't forget the security, if you are planning to use it in production.