Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-22-2006, 05:43 AM   #1
LQ Newbie
Registered: Feb 2006
Posts: 17

Rep: Reputation: 0
Email never arrives via my php script

Hi I'm quite strong in php but weak in Linux, I wrote a simple script to send an the script uses if/else statements I get a success message as if the mail reaches the outgoing mail service but each time I never receive the matter what to: address I use or however many times I try.

I don't have root access to the box I'm developing on but my boss does.....he got into the mail logs and here's what he saw......

tms1:/var/spool/exim4/msglog# cat *

2006-02-21 18:47:54 Received from www-data@ U=www-data P=local S=438

2006-02-21 18:47:56 R=dnslookup T=remote_smtp: SMTP error from remote mailer after MAIL FROM:<www-data@> SIZE=1471: host []: 501 Invalid Address

Process failed (1) when writing error message to www-data@ (frozen)tms1:/var/spool/exim4/msglog#

What does this mean?

I can telnet in on port 25 and send email at the command line.

here's the php script I wrote


//Declarate the necessary variables
$mail_sub="Emailing with php";
$mail_mesg="This is a test to see if I am able to email using php";

//Check for success/failure of delivery
echo "E-mail has been sent successfully to $mail_to";
echo "Failed to send the E-mail from $mail_sub to $mail_to";

Can anyone help please?
Old 02-22-2006, 06:21 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
That one maybe? It's usually backslash-r backslash-n.
Old 02-22-2006, 06:37 AM   #3
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
So \r\n, not /r/n


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you config postfix to redirect incoming email to a php script genux33 Linux - General 0 12-14-2005 04:46 AM
issues with mirc script accessing our php script dtra Linux - Software 2 07-02-2005 05:30 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 12:51 PM
converting shell script to php script ? ibro Linux - General 6 05-24-2004 06:19 AM
The FNG arrives BlenderGuy Linux - Newbie 6 03-02-2004 05:43 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:17 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration