RE: [PHP] Not able to send mail to multiple addresses

From: Date: Fri, 25 Aug 2000 10:27:29 +0000
Subject: RE: [PHP] Not able to send mail to multiple addresses
Groups: php.general 
Request: Send a blank email to php-general+get-13647@lists.php.net to get a copy of this message
Hmmm. PHP just talks to sendmail with the -t option. Why not write a little perl script that just accepts what's coming in on STDIN and captures it in a file. Then replace the /usr/sbin/sendmail -t in php.ini with this perl program so you can figure out what php is actually plugging in to sendmail. Perlscript something like this... #!/usr/bin/perl open(DUMPFILE,"/home/vivek/dump.txt"); while ($rec = <STDIN>) { print DUMPFILE $rec."\n"; }; Cheers. Mark. > -----Original Message----- > From: Vivek K [mailto:vivekk@india.hp.com] > Sent: 25 August 2000 11:16 > To: Wilkinson, Mark > Cc: Andris Jancevskis; PHP > Subject: Re: [PHP] Not able to send mail to multiple addresses > > > Hi > > still no luck. if i remove one address in the mail it works, > and when $To > receives the mail $To can see the $cc displayed ac CC, but > mail not went to > $cc. I think it is a strange problem. > Is this some thing to do with SMTP settings? > > Vivek > > "Wilkinson, Mark" wrote: > > > Hi, > > > > I think you have to have a space after the colon in each header ie.. > > > > To: person@domain.com > > > > And also try seperating the email addresses with > whitespace, not commas. > > Also, am not sure about the \r - I think just \n will do. > > > > Cheers. > > > > Mark Wilkinson > > http://www.wiggis.com > > > > > -----Original Message----- > > > From: Vivek K [mailto:vivekk@india.hp.com] > > > Sent: 25 August 2000 10:18 > > > To: Andris Jancevskis > > > Cc: PHP > > > Subject: Re: [PHP] Not able to send mail to multiple addresses > > > > > > > > > Hi > > > No luck, my code is here > > > <? > > > $To = "vivekk@india.hp.com,vivek@madona.com"; > > > $From = "World Wide Web"; > > > $cc = "vivekk@india.hp.com"; > > > $Headers = "From:" . $From . "\r\n"; > > > $Headers .= "To:" . $To . "\r\n"; > > > $Headers .= "Cc:" . $cc . "\r\n"; > > > $Headers .= "Bcc:vivek@madona.com\r\n"; > > > $Headers .= "Content-Type: text/plain; charset=iso-8859-1\r\n"; > > > $Headres .= "X-Mailer: CBAS v1.0.09\r\n"; > > > > > > $message = " Test message, please ignore"; > > > > > > $sub = "Test Message, please ignore this mail"; > > > mail($To,$sub,$message,$Headers); > > > ?> > > > If i remove one address in $To then only $To will receive the > > > mail. Now > > > no one receiving the mail. > > > is there anything wrong in this script? > > > > > > Vivek > > > > > > Andris Jancevskis wrote: > > > > > > > Add additional addresses to header part of message > > > > "To:me@you.com\nBcc:me@me.zl\n". > > > > > > > > May be it helps, > > > > > > > > Andris > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-general-help@lists.php.net > > > To contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > >

« previous php.general (#13647) next »