473,595 Members | 2,626 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mail() -> doesn't work; complains "Recipient names must be specified"

Hi All

Sendmail 8.12.11
php 4.3.9

Sendmail is installed and works properly.
php is NOT in safemode

from the command line; mail us**@domain.com < testmsg works fine.

Here is the code that I am trying.. Ideas?

$f************* **@soundwifi.ne t';
$t*******@yeste rdayspc.com';
$subject='Test' ;
$body=`cat welcome.txt`;

# mail($to, $subject, $body, $from);
# print "$result\n" ;
mail("to**@yest erdayspc.com"," junk","This is the body", \
"From: wi********@soun dwifi.net");

Please note that I have tried BOTH mail() functions above with the same
results...

Jul 17 '05 #1
14 22585

OldGuy wrote:
Hi All

Sendmail 8.12.11
php 4.3.9

Sendmail is installed and works properly.
php is NOT in safemode

from the command line; mail us**@domain.com < testmsg works fine.

Here is the code that I am trying.. Ideas?

$f************* **@soundwifi.ne t';
$t*******@yeste rdayspc.com';
$subject='Test' ;
$body=`cat welcome.txt`;

# mail($to, $subject, $body, $from);
# print "$result\n" ;
mail("to**@yest erdayspc.com"," junk","This is the body", \
"From: wi********@soun dwifi.net");


Try:

$to = '<to**@yesterda yspc.com>';
$from = 'From: <wi********@sou ndwifi.net>';
mail($to,'Junk' ,'Body lines',$from);
I believe you need the angle brackets around the addresses.

Ken

Jul 17 '05 #2
Try:

$to = '<to**@yesterda yspc.com>';
$from = 'From: <wi********@sou ndwifi.net>';
mail($to,'Junk' ,'Body lines',$from);
I believe you need the angle brackets around the addresses.

Ken


Nope, mail($to,'junk' ,'body lines',$from); still comes up with the
..subject complaint.

I think that I have tried all forms of variables:
"to: todh ...
"todh@ ...
'to: todh ...
'todh@ ... and it still complains about not having reciepents... I
believe that sendmail is complaining as I get:

Dec 13 08:57:24 yesterdays1 sendmail[17638]: iBDGvO59017638: from=root,
size=89, class=0, nrcpts=0,
msgid=<20****** *************** ****@yesterdays 1.soundwifi.net >,
relay=root@loca lhost

Looks like the function is NOT passing arguments correctly?

todh

Jul 17 '05 #3
Hello,

OldGuy wrote:
Sendmail 8.12.11
php 4.3.9

Sendmail is installed and works properly.
php is NOT in safemode

from the command line; mail us**@domain.com < testmsg works fine.

Here is the code that I am trying.. Ideas?

$f************* **@soundwifi.ne t';
$t*******@yeste rdayspc.com';
$subject='Test' ;
$body=`cat welcome.txt`;

# mail($to, $subject, $body, $from);
# print "$result\n" ;
mail("to**@yest erdayspc.com"," junk","This is the body", \
"From: wi********@soun dwifi.net");

Please note that I have tried BOTH mail() functions above with the same
results...


I think your message is sent but bounced to your root account. Check
your machine root mailbox and you will see.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #4
Nope, box is empty. The sendmail log line ( only one ) shows that we
*tried* to send, but it wasn't accepted. ( status sent) is not shown.

Manuel Lemos wrote:
Hello,

OldGuy wrote:
Sendmail 8.12.11
php 4.3.9

Sendmail is installed and works properly.
php is NOT in safemode

from the command line; mail us**@domain.com < testmsg works fine.

Here is the code that I am trying.. Ideas?

$f************* **@soundwifi.ne t';
$t*******@yeste rdayspc.com';
$subject='Test' ;
$body=`cat welcome.txt`;

# mail($to, $subject, $body, $from);
# print "$result\n" ;
mail("to**@yest erdayspc.com"," junk","This is the body", \
"From: wi********@soun dwifi.net");

Please note that I have tried BOTH mail() functions above with the
same results...

I think your message is sent but bounced to your root account. Check
your machine root mailbox and you will see.


Jul 17 '05 #5
Hello,

OldGuy wrote:
Nope, box is empty. The sendmail log line ( only one ) shows that we
*tried* to send, but it wasn't accepted. ( status sent) is not shown.


If it didn't bounce it is because it is still in the queue for a later
retry.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #6
Nope, Queue is empty as is root's mail box. Complete strange.

I am gonna try on another php enabled box just to see if it does the
same stuff..

Will post

Manuel Lemos wrote:
Hello,

OldGuy wrote:
Nope, box is empty. The sendmail log line ( only one ) shows that we
*tried* to send, but it wasn't accepted. ( status sent) is not shown.

If it didn't bounce it is because it is still in the queue for a later
retry.


Jul 17 '05 #7
Hello,

OldGuy said the following on 12/14/2004 05:07 PM:
Nope, Queue is empty as is root's mail box. Complete strange.


The only circumstance when that happens is when the return address does
not correspond to a valid deliverable mailbox. I think it is set to to
root@localhost by default. You need to change that to an usable address.

--

Regards,
Manuel Lemos

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
Jul 17 '05 #8
Ok, tried the 'other box' -> RedHat 9 [ 2.4.20-30.9 ], sendmail 8.12.10,
php 5.0.0

here is the script ( linewraps -> be careful ) and I know yesterdays is
not spelled correctly.

<?php

session_start() ;

$MailTo = "to**@yestrdays pc.com";
$MailSub = "Test'n from DaBackup";
$Message = "NOW is the time for all good men to come to the aid of
their country.";

mail($MailTo, $MailSub, $Message );

print "And the other\n";

mail("to**@yest rdayspc.com","T est from DaBackup","Now is the time...");
?>

Does the same thing for BOTH of the mail() functions. Except this time
I got some other stuff from php...

Recipient names must be specified
Recipient names must be specified
Content-type: text/html
X-Powered-By: PHP/5.0.0
Set-Cookie: PPSESSION=[insert ye favorite mumbojumbo here]: path=/

I must be doing something really st00pid?

Manuel Lemos wrote:
[snip]
The only circumstance when that happens is when the return address does
not correspond to a valid deliverable mailbox. I think it is set to to
root@localhost by default. You need to change that to an usable address.


root@localhost is a valid address. When sendmail encounters an invalid
sender AND the message bounces for some reason or another, postmaster is
notified and then forwarded to whom ever the alias points to ( root in
this case )

todh

Jul 17 '05 #9
Sun
Hi,

I had some problem with PHP 5 on Solaris 8 OS. it reads the php.ini
file, but its not using the config variable.

finally I used PEAR mail module to sent e-mail.
you can find the sample code in php documet web site.

-SR

Jul 17 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2521
by: Station Media | last post by:
Hi, here my problem, i use stored procedure in ACCESS database(latest version), and i would like to use this procedure but it doesnt work, do you know why ? Procedure: PARAMETERS MyField Text ( 255 ); SELECT DISTINCT MyField AS Result FROM tb_Client;
1
2299
by: nousha | last post by:
hi everybody, i have a dropdownlist in web application but it doesnt work if anybody met this problem before plz help me
3
7206
by: Clouds | last post by:
Hi ! How do I add the dynamic event handler for a dropdownlist present in the itemtemplate of a datalist !! I am doing it in the itemdatabound event of the datalist but it doesnt work... I am also setting the autopostback property to true for the dropdown list and it works but the handler doesnt get invoked at runtime... I have to do it in itemdatabound becaz whether to add the handler or not is driven based on the information which i...
9
6161
by: nichas | last post by:
I tried to use #include<iostream> in visual C++ compiler but then it didnt work but i see this is the way it is being mentioned in C++ primer by lippman and lajoie.. where is the problem.. Do reply please.
0
1629
by: Juna | last post by:
I have been working in vs2003, but now started to work in vs2005 but the problem, I have simple web application not website, which work i mean open in browser when we press F5 or run the application by pressing run button. but it doesnt work when we type the path directly in the browser's address bar eg. http://localhost/testapplicationdefault.aspx error it gives is "COULD NOT LOAD testapplication._default". IN default.aspx. While in...
1
2071
Digital Don
by: Digital Don | last post by:
I am writing a program for Peg solitaire... To check for no repetition of previous states I use a Set for storage of Board states.. The pronblem is when I declare the set as type char i.e. set <char> open it doesnt take any char values into it and says cannot convert char to const char... I wonder why is it converting char to const char when I have declared that it shud be of type char...It doesnt work with int either,.. Please help...
3
2961
by: jx2 | last post by:
hi guys i would appriciate your coments on this code - when i ran it for the very first time it doesnt see @last = LAST_INSERT_ID() but when i ran it next time it read it properly i need to know it imiedietely after i insert value into session1... is there any other way to do it? insert into 2 tables at the same time ...? if(!($sessid)){ session_register('sessid'); mysql_query("insert into session1 set sessid=null,
1
1587
by: Dany13 | last post by:
hi all. i using some text box for input value and some localvarible for passing this data to dataset . give instance for correct row of dataset and data in data table . use one gird view for showing curent data in dataset . in end i am calling update metod to insert data in sql database but this metod doesnt work correctly. at all doesnt work. but givenot any error . fill data from my database (work propebly) ...
20
2838
by: Hush | last post by:
Hi, The following code works fine in IE7 but FF returns with an error: Access denied to achieve the property Element.firstChild. In this line: nodes = xmlDoc.documentElement.childNodes; My code:
0
7882
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8260
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8250
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
3872
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3908
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1490
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.