mail() function in PHP

A

Anonymous

Guest
I have this code that I am running. I use WinXP pro. IIS.
When I run this piece of code it just hangs and then times out.

If i take it out my code works( so I know it's something here).

Any hints?

Code:
if (strtoupper($notify)=="YES") {
      $msgtitle = "Test Message from your site";
      $vcomment = str_replace(""","\"",$vcomment);   
      $vcomment = stripslashes($vcomment);
      $msgcontent = "Local time : $tgl\n\nThe addition from $vname reads :\n---------------------\n\n$vcomment\n\n-----End Message-----";
      mail($admin_email,$msgtitle,$msgcontent,"From: $vemail\n");
   }
 
Pejone said:
mail function want to connect with mail - server , whitch not installed on your PC =)

options in ypu php.ini file =)

I have IIS installed with the Virtual SMTP server installed.
Is there a way for me to configure the IIS SMTP to work with PHP?
 
imroue said:
Pejone said:
mail function want to connect with mail - server , whitch not installed on your PC =)

options in ypu php.ini file =)

I have IIS installed with the Virtual SMTP server installed.
Is there a way for me to configure the IIS SMTP to work with PHP?
Sorry, but in IIS and Win2000/XP you do not have SMTP server....
 
WiZARD said:
imroue said:
Pejone said:
mail function want to connect with mail - server , whitch not installed on your PC =)

options in ypu php.ini file =)

I have IIS installed with the Virtual SMTP server installed.
Is there a way for me to configure the IIS SMTP to work with PHP?
Sorry, but in IIS and Win2000/XP you do not have SMTP server....

But what is the "Default SMTP Virtual Server" in my IIS then?
Is this something totaly different?
Do you have any suggestions of a free smtp server?
 
php.ini

[mail function]
; For Win32 only.
SMTP = smtp.pejone.net ; for Win32 only

; For Win32 only.
sendmail_from = pejone@pejone.net ; for Win32 only

; For Unix only. You may supply arguments as well (default: 'sendmail -t -i').
;sendmail_path =
 
Pejone said:
php.ini

[mail function]
; For Win32 only.
SMTP = smtp.pejone.net ; for Win32 only

; For Win32 only.
sendmail_from = pejone@pejone.net ; for Win32 only

; For Unix only. You may supply arguments as well (default: 'sendmail -t -i').
;sendmail_path =

Thanks Pejone.
Does this mean, that I don't need an SMTP server and that PHP will automatically use my ISP's SMTP?
 
Pejone said:
yes.
but you can have a own smtp server =)


I tried it and now I get a new error:

Warning: Mailserver rejected our "sendmail_from" setting in E:\Web\OurSite\guestbook\ardguest.php on line 583

This is what i changed... I think the SMTP passed
but the sendmail_from (did not :cry:)

[mail function]
; For Win32 only.
SMTP = 66.185.95.99 ; for Win32 only

; For Win32 only.
sendmail_from = imroue74@rogers.com ; for Win32 only

Do you think the "IIS Virtual SMTP server" can be used for something? I would rather NOT use my own SMTP server (if possible). I would like to use the smtp server that my isp has.
 
imroue said:
Thanks Pejone.
Does this mean, that I don't need an SMTP server and that PHP will automatically use my ISP's SMTP?
I think what you not sure that is that SMPT - SimplyMailTransferProtocol.
But if you need send you may use you're virtual server.... if can configured this service.... I hate Microsoft for that!
 
I think what you not sure that is that SMPT - SimplyMailTransferProtocol.
But if you need send you may use you're virtual server.... if can configured this service.... I hate Microsoft for that!

Thanks for the reply WIZARD.
I think that is the problem. I can't figure out how to setup the virtual server for microsoft. Maybe you can tell me of another server I can use and configure.
 
imroue said:
I think what you not sure that is that SMPT - SimplyMailTransferProtocol.
But if you need send you may use you're virtual server.... if can configured this service.... I hate Microsoft for that!

Thanks for the reply WIZARD.
I think that is the problem. I can't figure out how to setup the virtual server for microsoft. Maybe you can tell me of another server I can use and configure.
You may use SMTP server your's ISP (InternetServiceProvider) but firstly you need check this by telnet <adress> 25. If server respond, you may use this in php.ini
 
WiZARD said:
imroue said:
I think what you not sure that is that SMPT - SimplyMailTransferProtocol.
But if you need send you may use you're virtual server.... if can configured this service.... I hate Microsoft for that!

Thanks for the reply WIZARD.
I think that is the problem. I can't figure out how to setup the virtual server for microsoft. Maybe you can tell me of another server I can use and configure.
You may use SMTP server your's ISP (InternetServiceProvider) but firstly you need check this by telnet <adress> 25. If server respond, you may use this in php.ini

Thans Wizard, that worked and I am able to send mail now :lol:

One last question concerning this, the
send_mail_from = NULL.

When I put an address there, it doesn't work. What is it for?
 
imroue said:
WiZARD said:
imroue said:
Thanks for the reply WIZARD.
I think that is the problem. I can't figure out how to setup the virtual server for microsoft. Maybe you can tell me of another server I can use and configure.
You may use SMTP server your's ISP (InternetServiceProvider) but firstly you need check this by telnet <adress> 25. If server respond, you may use this in php.ini

Thans Wizard, that worked and I am able to send mail now :lol:

One last question concerning this, the
send_mail_from = NULL.

When I put an address there, it doesn't work. What is it for?
Some admins protect SMTP for spam and floode....
 
Back
Top