Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP mail function issues...
Old 01-06-2009, 08:15 PM PHP mail function issues...
Skilled Talker

Posts: 68
Name: Avi Zolty
Location: Atlanta
Trades: 0
I used a PHP mail function- and it work's perfectly on my computer...
However when a friend tries it, or any other computer, I'm not receiving any E-mail.

Is there any reason for this?
Zoltar1992 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-06-2009, 08:42 PM Re: PHP mail function issues...
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
Does the server that the script is on support/has a mail server on it.

also, a code snippet would help
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 01-06-2009, 08:50 PM Re: PHP mail function issues...
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
if the web server runs on a windows computer, he must alter the php.ini file to specify the smtp server and username/password to use to send a mail.
http://www.php.net/manual/en/mail.configuration.php
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-06-2009, 08:55 PM Re: PHP mail function issues...
Skilled Talker

Posts: 68
Name: Avi Zolty
Location: Atlanta
Trades: 0
My server Is running under Linux.

How do I adjust/specify sendmail path or SMTP or whatever it is I need to do?
(SMTP is now "localhost")
Zoltar1992 is offline
Reply With Quote
View Public Profile
 
Old 01-06-2009, 10:20 PM Re: PHP mail function issues...
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
You need to set up a mail server and then set your php.ini to use that mail server.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 01-07-2009, 03:40 AM Re: PHP mail function issues...
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Quote:
Originally Posted by Zoltar1992 View Post
My server Is running under Linux.

How do I adjust/specify sendmail path or SMTP or whatever it is I need to do?
(SMTP is now "localhost")
You don't. PHP use the "sendmail" binary on linux. On Windows, as this is not available, it requires to have an smtp server defined in php.ini to handle those mails.

But of course, if you have an mta (postfix, sendmail, exim) installed on your server, it will use it, as they usually installs wrappers for "sendmail".

The trick is that if the server of your friend is Window based, he need to adapt php.ini to specify the smtp server of his ISP.
Your server being Linux based, you don't need to alter anything.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 01-07-2009, 01:10 PM Re: PHP mail function issues...
Skilled Talker

Posts: 68
Name: Avi Zolty
Location: Atlanta
Trades: 0
Thanks everyone for all the advice...
I switched this onto another one of my sites (hosted on the same server)
and it works on that site.
Why would a mail script work on only one of my sites?
The new site (the one it works on) is actually a reseller so the one it DIDN'T work on is hosted 'through' it. Is there any way that maybe when i created myself the package I didn't give my site 'permission' to use the protocol or something?


and for future reference how do you adjust/set-up the php.ini?

Last edited by Zoltar1992; 01-07-2009 at 01:13 PM..
Zoltar1992 is offline
Reply With Quote
View Public Profile
 
Old 01-07-2009, 07:39 PM Re: PHP mail function issues...
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
Quote:
Originally Posted by Zoltar1992 View Post
Thanks everyone for all the advice...
I switched this onto another one of my sites (hosted on the same server)
and it works on that site.
Why would a mail script work on only one of my sites?
The new site (the one it works on) is actually a reseller so the one it DIDN'T work on is hosted 'through' it. Is there any way that maybe when i created myself the package I didn't give my site 'permission' to use the protocol or something?

and for future reference how do you adjust/set-up the php.ini?
Its the server's Operating System, Linux doesn't require any settings changes, while windows does.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Reply     « Reply to PHP mail function issues...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26818 seconds with 12 queries