Re: Problems with using mail() for multiple address

From: Date: Sun, 30 Jul 2000 05:02:05 +0000
Subject: Re: Problems with using mail() for multiple address
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9020@lists.php.net to get a copy of this message
If you are referring to multiple recipients I believe you have to add CC headers the same way you added the From and Reply-to headers. I'm not sure if this makes a difference but I seem to recall that the delimiter for these headers is \r\n (per the documentation), not just \n as you have it, but if those headers are working, might as well leave it alone. Jeff mccrorey@optushome.com.au wrote: > > Hi all, > > I'm trying to write a form mailer for use on a friend's site. I'm using my local > win95 machine for testing and phpinfo reckons I'm running PHP Version 4.0.1pl2. I'm also > running Apache as my webserver. > > Things are going well as the IMAP functions are bloody easy to use (I'm also building a > pop mail checker). The only hitch I've hit so far is this: I can send e mails easily (In fact > as a test I'm sending mail from the form NOW), but I can't seem to send to more than one > address at once. What is the "delimiter" for multiple address in the mail() command? > I've tried comma, but I get this: "Warning: Server Error in c:\apache\htdocs\mail.php on > line 17" > The same results occur when I try just a space as a delimiter. > > What's the proper syntax? My command line is as such: > > mail("$sentto", "$subj", "$body", "From: > $senderaddy\nReply-To: $senderaddy\nX-Mailer: PHP"); > > The variables are sent from a form, naturally. > > Anyone out there with a clue? > > Cheers, > > Bradley > > -- > 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 (#9020) next »