PHP mail() in free webhosting

the mail() function

Moderators: macek, egami, gesf

qazgo
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Sep 10, 2004 10:58 am

PHP mail() in free webhosting

Postby qazgo » Sat Sep 11, 2004 12:35 am

Hi...
Can anyone help me :help:, I get stuck when trying to use mail() function in my freehosting. Is there something should be added in the script before mail() function called?

Tnx . . .

User avatar
bezmond
Moderator
Moderator
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK
Contact:

Postby bezmond » Sat Sep 11, 2004 4:53 am

Not really - check you are using the correct paramaters for mail(), and if in doubt, contact your host to see if it is enabled...


Andrew

qazgo
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Sep 10, 2004 10:58 am

Postby qazgo » Sat Sep 11, 2004 9:05 pm

here is my code

<?php
mail ('qaz4web@yahpoo.co.uk', 'the subject', 'the message');
?>

is there anything wrong with that code ?

User avatar
gesf
Moderator
Moderator
Posts: 1717
Joined: Sun Dec 29, 2002 5:03 am
Location: Portugal / Sweden
Contact:

Postby gesf » Sun Sep 12, 2004 9:11 pm

Not sure, but try to remove that space beween 'mail' and '('qaz4...'!
Or... check the mail configuration in your php.ini.

qazgo
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Sep 10, 2004 10:58 am

Postby qazgo » Mon Sep 13, 2004 1:30 am

I get this from phpinfo()
:-o
Directive Local Value==Master Value
sendmail_path /www/hosting/bin/sendmail.php
SMTP localhost
smtp_port 25

then i renew my code like this

<?php
ini_set('sendmail_path', '/www/hosting/bin/sendmail.php');
ini_set('SMTP', 'localhost');
ini_set('smtp_port', 25);
if (mail('ineedhelp@yahoo.co.uk', 'Sub', 'Msg')) echo "OK";
?>

And it's response is OK when i request it thru browser.
But i still don't receive it in my inbox :shock:
and please remember guys i cannot modify php.ini directly as i use FreeHosting. I register at http://www.internetworx.de and i can't speak Dutch 8O 8-O

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Mon Sep 13, 2004 8:06 pm

qazgo wrote:<?php
ini_set('sendmail_path', '/www/hosting/bin/sendmail.php');


don't do the above code... thats the path for the sendmail program "binary" not your php code page

qazgo
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Sep 10, 2004 10:58 am

Postby qazgo » Tue Sep 14, 2004 2:26 am

Wot do u mean :sad: pls show me the correct 1, i dunno wot 2 do :eek:


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest