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

This is a discussion on mail() -> doesn't work; complains "Recipient names must be specified" within the PHP Language forums, part of the PHP Programming Forums category; Hello, on 12/15/2004 12:09 PM OldGuy said the following: > Ok, tried the 'other box' -> RedHat ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 12-16-2004
Manuel Lemos
 
Posts: n/a
Default Re: mail() -> doesn't work; complains "Recipient names must be specified"

Hello,

on 12/15/2004 12:09 PM OldGuy said the following:
> 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 = "todh@yestrdayspc.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("todh@yestrdayspc.com","Test 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?


You are missing the headers of the message. These are really not
optional. You also need to set the return path address which is what
defines to where your messages should be bounced when they can't be
delivered. Message bounces often reveal problems in your system.

Have you tried this class? It can send messages correctly as needed so
you can confirm what is the problem as it sets the return path address
correctly if possible in your setup.

http://www.phpclasses.org/mimemessage


--

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
Reply With Quote
  #12 (permalink)  
Old 12-16-2004
Manuel Lemos
 
Posts: n/a
Default Re: mail() -> doesn't work; complains "Recipient names must be specified"

Hello,

on 12/15/2004 12:09 PM OldGuy said the following:
> 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 = "todh@yestrdayspc.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("todh@yestrdayspc.com","Test 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?


You are missing the headers of the message. These are really not
optional. You also need to set the return path address which is what
defines to where your messages should be bounced when they can't be
delivered. Message bounces often reveal problems in your system.

Have you tried this class? It can send messages correctly as needed so
you can confirm what is the problem as it sets the return path address
correctly if possible in your setup.

http://www.phpclasses.org/mimemessage


--

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
Reply With Quote
  #13 (permalink)  
Old 12-16-2004
OldGuy
 
Posts: n/a
Default Re: mail() -> doesn't work; complains "Recipient names must be specified"

Thanks Manuel

Just for your information I checked another box. I also have PHP
installed on another web server -> 4.3.8 with Apache 1.3.31 which works
with the below script. Real head scratcher now isn't it. Note that it
didn't matter if I had $Vars in the mail() structure, or the actual data
in quotes, mail went out as I expected.

The funny thing is that I have installed php, apache, sendmail ... etc
on multiple machines with no problems. When I get something working
properly, I continue with that exact config/install...etc until
something else is tested and working. Well, ok, until now with the
mail() issue.

I am going to give 4.3.10 a try to see if that does something else; like
maybe work?

I downloaded your class, will give it a try if PHP4.3.10 version doesn't
work for me.

todh

Manuel Lemos wrote:
> Hello,
>
> on 12/15/2004 12:09 PM OldGuy said the following:
>
>> 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 = "todh@yestrdayspc.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("todh@yestrdayspc.com","Test 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?

>
>
> You are missing the headers of the message. These are really not
> optional. You also need to set the return path address which is what
> defines to where your messages should be bounced when they can't be
> delivered. Message bounces often reveal problems in your system.
>
> Have you tried this class? It can send messages correctly as needed so
> you can confirm what is the problem as it sets the return path address
> correctly if possible in your setup.
>
> http://www.phpclasses.org/mimemessage
>
>


Reply With Quote
  #14 (permalink)  
Old 12-16-2004
Manuel Lemos
 
Posts: n/a
Default Re: mail() -> doesn't work; complains "Recipient names must be specified"

Hello,

on 12/15/2004 11:28 PM OldGuy said the following:
> I am going to give 4.3.10 a try to see if that does something else; like
> maybe work?
>
> I downloaded your class, will give it a try if PHP4.3.10 version doesn't
> work for me.


I think you making blind guesses of what is your problem. What you need
to do is to somehow set the return path address of the messages to an
address with a valid e-mail account. Once you figure that you will be
able to see why messages may be bouncing and figure your real problem.

That class will help you figuring how to set the return path address but
all it does is using plain PHP code.

--

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
Reply With Quote
  #15 (permalink)  
Old 12-16-2004
Gordon Burditt
 
Posts: n/a
Default Re: mail() -> doesn't work; complains "Recipient names must be specified"

>> I am going to give 4.3.10 a try to see if that does something else; like
>> maybe work?
>>
>> I downloaded your class, will give it a try if PHP4.3.10 version doesn't
>> work for me.

>
>I think you making blind guesses of what is your problem. What you need
>to do is to somehow set the return path address of the messages to an
>address with a valid e-mail account.


There are a lot of servers that will not accept an email with an
invalid return address. Some of them go to the effort to check the
return address by starting to send a bounce message to the server
referred to by the return address, stopping short of sending a
message body. If that fails, your message will not be accepted.

Also, if you have set your server to not accept bounce messages
(return envelope address of "<>"), your outgoing messages may
not be accepted.

Gordon L. Burditt
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0