Jump to content
The Uniform Server Community
krayziehustler

Mail() function not running

Recommended Posts

i always get and error asking about SMTP and SMTP Port and no matter what i change in the php.ini i cant use the mail function, any help would be very much appreciated

 

I have seen this problem raised on a number of forums what you are looking for is an SMPT server. I assume you are either learning PHP or want to test your programs locally.

 

I am in the process of writing a guide purely to cover this situation using UniServer. This will be out in about a week or two.

 

However if you need the info more quickly and have the experience take a look at this page http://www.burrotech.com/om_steps5.php . They have produced an ideal solution to this problem and for free.

 

To run something like this:

 

<?php

$mailaddress = "admin1@fred.com";

$mailsubject = "Another test";

$mailbody = "Hello, world! Again";

mail($mailaddress, $mailsubject, $mailbody);

?>

 

From a clean install of Office Mail.

Leave all the defaults as they are and perform the next two steps:

 

 

1) Click Users: Set up a user named admin1 password admin1

2) Click on local distribution and + (add) enter:

Mail address: admin1@fred.com

To user enter: admin1

 

Thats all you need to do, run your PHP program and the mail will be received in Office Mail. Check it out if Office-Mail not displayed click its icon bottom right in the system tray.

 

All the best

Share this post


Link to post
Share on other sites

What have you set for the SMTP, sendmail_from and sendmail_path directives in your php.ini, have you commented any of them? If I remember correctly, you should have sendmail_path commented if you're using Windows.

Share this post


Link to post
Share on other sites

you guys ROCK!!!!!!!!!!!!!!!!!!!!!!

 

for some reason, my php.ini file had the sendmail path un commented so once i commented it I stopped recieveing the SMTP error, and with OFFICE MAIL I am now receiving the mail I sent duringm y local code testing.......... much thanks!!!!!!!!!

Share this post


Link to post
Share on other sites

No problem.

 

I wonder if Fake Sendmail mentioned in this thread by Olajide works with sendmail_path, considering php.ini labels that as "for UNIX only".

Share this post


Link to post
Share on other sites

"I am in the process of writing a guide purely to cover this situation using UniServer. "

 

Finished can be found here:

 

http://www.center.uniformserver.com/

 

:)

Share this post


Link to post
Share on other sites

A while ago...

 

(14:40:36) Alley^Away: Do you know if sendmail_path works on Windows with Fake Sendmail?

(14:40:56) no idea

(14:41:07) fake sendmail as hooking it up with win's own?

(14:42:32) No

(14:42:48) http://glob.com.au/sendmail/

(14:43:17) ok, not the slightest

(14:43:35) Ok :(

(14:48:20) oh, this even requires a real smtp

(14:48:44) isn't there a small real smtp forwarder exe for win on SF somewhere?

 

If anyone finds that "small real smtp forwarder exe for win" AlleyKat was talking about, please inform me, here or in a private message :D

Share this post


Link to post
Share on other sites

Damn, dude, you should have asked when I was online at some point...

 

http://www.blat.net/ (Blat)

http://emailrelay.sourceforge.net/ (possible other like it)

 

I don't think it was either of these I've run across at some point, but I'm on the other hand quite sure theres a link to it here in the forums somewhere... :)

Share this post


Link to post
Share on other sites

Hi AlleyCat (Again)

 

Seems as if I am chasing you around today not intended. Taken a quick look at the above link found the material interesting well documented and worth a read.

 

I like alternatives and this is another good one to add to anyone’s bag of goodies.

 

My write-up of Mercury is similar in that it performs E-Mail relaying however what may be more significant is code size EmailRelay is smaller than Mercury which weighs in at around 4Mb with all components.

 

:)

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...

×
×
  • Create New...