PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
zacky
Forum Newbie
Posts: 19 Joined: Fri Nov 29, 2002 6:08 am
Post
by zacky » Mon Dec 23, 2002 12:47 pm
when I try to send a mail with the mail() function..
I get a error, in a mail to root..
Diagnostic-Code: SMTP; 550 cannot route to sender address <
nobody@jalla.jalla.com >
what's wrong?
Here some more from the mail:
<<< 550 cannot route to sender address <
nobody@jalla.jalla.com >
550 5.1.1
zacky@blah.com ... User unknown
evilcoder
Forum Contributor
Posts: 345 Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia
Post
by evilcoder » Tue Dec 24, 2002 12:25 am
what code are you using to send it?
zacky
Forum Newbie
Posts: 19 Joined: Fri Nov 29, 2002 6:08 am
Post
by zacky » Tue Dec 24, 2002 3:39 pm
$mail = mail("
zacky@blah.com ", "subject", "jalla!");
evilcoder
Forum Contributor
Posts: 345 Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia
Post
by evilcoder » Tue Dec 24, 2002 5:00 pm
try this:
$email = "The email you want to send to";
$yemail = "Your email";
$body = "Hey
this is the message
and spaces will actually come out in the email";
mail("$email","Subject","$body","From:$yemail");
that will work.
zacky
Forum Newbie
Posts: 19 Joined: Fri Nov 29, 2002 6:08 am
Post
by zacky » Wed Dec 25, 2002 4:46 pm
no.. that din't work.. here's the error root get:
----- The following addresses had permanent fatal errors -----
zacky@blah.com
(reason: 550 rejected: cannot route to sender <
nobody@jalla.jalla.com >)
----- Transcript of session follows -----
... while talking to mail.blah.com.:
>>> DATA
<<< 550 rejected: cannot route to sender <
nobody@jalla.jalla.com >
554 5.0.0
zacky@blah.com ... Service unavailable
jalla = server the script is sendt from.. (example name)
zacky@blah.com = example of email adress (yes, the email I use is working fine)
evilcoder
Forum Contributor
Posts: 345 Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia
Post
by evilcoder » Wed Dec 25, 2002 5:53 pm
Is your webserver windows or linux? Do you host yourself or by a company, if its by a company i'd be asking them, coz its definately a server issue.
zacky
Forum Newbie
Posts: 19 Joined: Fri Nov 29, 2002 6:08 am
Post
by zacky » Thu Dec 26, 2002 5:21 am
no.. It's my linux box on my own line..
what's wrong?
evilcoder
Forum Contributor
Posts: 345 Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia
Post
by evilcoder » Thu Dec 26, 2002 5:24 am
I've tested that code over and over on BOTH my localhost server and on my paid hosting server and it works without a hitch.
Check your php.ini and server configs. Look for sendmail and mail functions especially.
I dont know much about server configs, so i'm not much of a help. sorry.
zacky
Forum Newbie
Posts: 19 Joined: Fri Nov 29, 2002 6:08 am
Post
by zacky » Thu Dec 26, 2002 5:34 am
hmm.. ok..
I tried that script on my laptop, with qmail installed..
that worked.. but it din't work on the other linux box with net.
Do I have to have qmail(or something) installed if mail() should work ?
zacky
Forum Newbie
Posts: 19 Joined: Fri Nov 29, 2002 6:08 am
Post
by zacky » Fri Dec 27, 2002 10:00 am
ok.. I found the problem.. (it was a server prob.)
tnx anyway
It's working now