Jump to content

How to configure Mail() function to work on windows 2003 server on IIS


reypapz

Recommended Posts

Hello anybody...I am a newbie on this forum...And I hope somebody can help solving my problem...

 

here we go..How to configure the mail() function on PHP to work on Windows server 2003 standard Edition with IIS 6.0...My head is going to burst finding solution with this...can anybody help me with this...

 

=>>this is some info of my php.ini

[mail function]

; For Win32 only.

SMTP = localhost

smtp_port = 25

 

; For Win32 only.

;sendmail_from = me@example.com

 

I hope somebody could help me..

 

thanks

Link to comment
Share on other sites

The SMTP setting must list either the hostname or IP address of your mail server and if your mail server is not using port 25, then you must set the smtp_port setting to match the actual port. sendmail_from is a default From: header if you don't provide a header parameter to the mail() function call. Stop and start your IIS service to get any changes made to php to take effect.

 

Your post does not state a specific problem, what exactly do you need help with that is not working?

Link to comment
Share on other sites

hi..im sory if my prev post sound unclear of what i want...this my problem

 

$From="sample@domain.com";

mail("test@domain.com","testing to works on windows server","Testing","From: " . $From)

 

that code works on linux server but when I tried on my windows server it doesnt work...

 

I tried already that option you give me but still not luck...any other way to solve this problem...

 

I tried this

 

[mail function]

; For Win32 only.

SMTP = mail.domain.com

smtp_port = 2525

 

; For Win32 only.

sendmail_from = me@example.com

 

but stil doenst work...any other way...plz help me..

 

thanks

Link to comment
Share on other sites

Are the settings actually getting changed? Check using a phpinfo(); statement.

 

Telling us something does not work does not help us to help you. What exactly is it doing? What are the symptoms? Are there any errors? Have you checked your web server error log file or turned on full php error reporting to see if there are any errors?

 

Add the following two lines immediately after your first opening <?php tag -

 

ini_set ("display_errors", "1");
error_reporting(E_ALL);

 

What is your script? Your settings might be correct but your script might not be correct.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.