The reason I am using "\r\n" is because the PHP Manual says so (http://us2.php.net/manual/en/function.mail.php#id3111167). I use implode because it is easier [in my opinion], but you will achieve the same result with: "From: x@xxxxxxx\r\nBbc: a@xxxxxxx"; On Nov 19, 2007 7:22 PM, Brad <brads@xxxxxxxxx> wrote: > Sir, you are very kind, but your implementation of "array" has me as the > "monkey with a light bulb" > I know BASIC (the language) at a minimal. > Basic functionality I know; > Your implementation of core knowledge programming to php quarks is blowing > my mind when looking at my existing problem. > > #1 > You build your array with; > = array( > 'Function 1', > 'function 2', > //... > ); > > ????? > //... > ); > ?????? > > Skip the ... and end with "):" > > Php has enough goof ball stuff, with it's mail function. > > Your suggestion is kind but you are shooting over my head... > $headers = implode("\r\n", $headers); > > Implode > Hmmm = build array here but, the usage of "\r\n" is already confusing me. > The manual says to use it for Bcc > Parse error says otherwise when not in you array. > Why? > > Else "blame casey" > > Never, you are trying to help! > > Brad > > > > > -----Original Message----- > From: Casey [mailto:heavyccasey@xxxxxxxxx] > Sent: Monday, November 19, 2007 9:48 PM > To: Brad > > Cc: Andrés Robinet; <php-general@xxxxxxxxxxxxx> > Subject: Re: two small issues with php mail > > Note this code is untested and directly typed from a phone. > > <?php > $to = 'bob@xxxxxxxxxx'; > $subject = 'Free iPod!'; > $message = 'Even though I will be filtered, get your FREE iPod at > http://www.obviouslyascam.com > !'; > $headers = array( > 'From: food@xxxxxxx', > 'Bbc: yay@xxxxxxx', > // ... > ); > $headers = implode("\r\n", $headers); > if (mail($to, $subject, $message, $headers)) > echo 'Success!'; > else blameCasey(); > ?> > > Note: you might need to change some code before you use it (in an > attempt to stop you from ripping off my code). > > > > On Nov 19, 2007, at 6:26 PM, "Brad" <brads@xxxxxxxxx> wrote: > > > For the purposes of this task, mailer is not an option. > > This is a class assignment to put us into the weeds. > > I am neck deep googling the heck out of this and finding snippets of > > un-related code which do not fit. > > > > Just seek help from a knowledgeable community to help me past the > > learning > > curve. > > > > And getting hit hard from hecklers in the process. > > > > I am not having a good day with php! > > > > I took this class because of it's Linux and Unix origin... > > > > I am not having a good day! > > > > -----Original Message----- > > From: Andrés Robinet [mailto:agrobinet@xxxxxxxxxxxxx] > > Sent: Monday, November 19, 2007 8:49 PM > > To: 'Brad' > > Cc: php-general@xxxxxxxxxxxxx > > Subject: RE: two small issues with php mail > > > > Did I miss something or the following line in your code is useless? > > > >> $smtp = "localhost"; > > > > Brad, if you really need SMTP configuration, and you want to make > > your life > > easier with attachments and extra headers, give a chance to PHPMailer > > http://phpmailer.codeworxtech.com/. It's free, easy to set up and > > use, and > > can do much more than you need. > > > > Rob > > > > Andrés Robinet | Lead Developer | BESTPLACE CORPORATION > > 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, > > FL 33308 > > | TEL 954-607-4207 | FAX 954-337-2695 | > > Email: info@xxxxxxxxxxxxx | MSN Chat: best@xxxxxxxxxxxxx | SKYPE: > > bestplace | Web: bestplace.biz | Web: seo-diy.com > > Confidentiality: > > "All information in this email message, including images, attachments, > > contains confidential and proprietary information of BESTPLACE > > CORPORATION > > and should only be used or serves for the intended purpose and > > should not be > > copied, used or disclosed to anyone other than the sole recipient of > > this > > e-mail message." > > > >> -----Original Message----- > >> From: Brad [mailto:brads@xxxxxxxxx] > >> Sent: Monday, November 19, 2007 10:27 PM > >> To: php-general@xxxxxxxxxxxxx > >> Subject: FW: two small issues with php mail > >> > >> > >> > >> > >> > >> _____ > >> > >> From: Brad [mailto:brads@xxxxxxxxx] > >> Sent: Monday, November 19, 2007 8:26 PM > >> To: 'David Giragosian' > >> Subject: RE: two small issues with php mail > >> > >> > >> > >> My original issue is trying to implement a Bcc and > >> > >> > >> > >> Emails are only making it to 50% of the recipients. > >> > >> Research and past experience says that I need to implement smtp > >> into my > >> code. > >> > >> > >> > >> Testing of the present "parse free" code show that email > >> addresses on > >> the > >> same server: To: works Bcc: does not > >> > >> > >> > >> Once Bcc: works on same server, I will need to test Bcc on another > >> server > >> which I am sure requires the proper smtp configuration. > >> > >> > >> > >> Working code: > >> > >> > >> > >> <? > >> > >> $email = $_REQUEST['email']; > >> > >> $fromaddress = 'admin@xxxxxxxxxxxxxxxx'; > >> > >> $fromname = 'ggggggggggggg'; $eol = "\r\n"; > >> > >> $smtp = "localhost"; > >> > >> $headers = 'From: '.$fromname.' <'.$fromaddress.'>'.$eol; > >> > >> $headers .= 'Bcc: webmaster@xxxxxxxxxxxxxxxx'; $eol = "\r\n"; > >> > >> $headers .= 'Reply-To: '.$fromname.' <'.$fromaddress.'>'.$eol; > >> > >> $headers .= 'Return-Path: '.$fromname.' <'.$fromaddress.'>'.$eol; > >> > >> $headers .= 'X-Mailer: PHP '.phpversion().$eol; > >> > >> $headers .= 'Content-Type: text/html; charset=iso-8859-1'.$eol; > >> > >> $headers .= 'Content-Transfer-Encoding: 8bit'; > >> > >> $subject = 'Your free book!'; > >> > >> $body = '<a > >> href="http://www.xxxxxxxxxxxxxxxx.com/freePDF/ > >> autopilotebook.pdf">"Clic > >> k > >> ME"</a> Here is your FREE autopilot book!!!!'; > >> > >> mail($email, $subject, $body, $headers); > >> > >> ?> > >> > >> > >> > >> _____ > >> > >> From: David Giragosian [mailto:dgiragosian@xxxxxxxxx] > >> Sent: Monday, November 19, 2007 7:25 PM > >> To: Brad > >> Cc: php-general@xxxxxxxxxxxxx > >> Subject: Re: two small issues with php mail > >> > >> > >> > >> > >> > >> On 11/19/07, Philip Thompson <HYPERLINK > >> "mailto:philthathril@xxxxxxxxx"philthathril@xxxxxxxxx> wrote: > >> > >> On Nov 19, 2007 5:52 PM, Brad <HYPERLINK > >> "mailto:brads@xxxxxxxxx"brads@xxxxxxxxx> wrote: > >> > >>> Why are you being to belligerent? > >>> English 101-104 I have aced. > >>> Top secret security clearance I maintain. > >>> Concatenate I know well (why would I combine the from, and the bcc?) > >> > >> > >> I will refrain from the rest of the posts/slams and stick to your > >> question > >> in the (...). > >> > >> "From" and "Bcc" are *BOTH* part of the headers - that's why you want > >> to > >> concatenate them. By not using the . (dot), you are over-writing the > >> "From" > >> line. > >> > >> Bad/Pointless assignment: > >> $headers = "From: ..."; > >> $headers = "Bcc: ..."; > >> > >> Good/Useful assignment: > >> $headers = "From: ..."; > >> $headers .= "Bcc: ..."; > >> > >> Good luck. > >> ~Philip > >> > >> > >> > >> Brad, > >> > >> > >> > >> If Philip's suggestion doesn't fix the problem, please post the > >> relevant > >> code, again. > >> > >> > >> > >> I've lost track of your original question. > >> > >> > >> > >> David > >> > >> > >> > >> > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: > >> 11/18/2007 > >> 5:15 PM > >> > >> > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: > >> 11/18/2007 > >> 5:15 PM > >> > >> > >> > >> No virus found in this outgoing message. > >> Checked by AVG Free Edition. > >> Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: > >> 11/18/2007 > >> 5:15 PM > >> > > > > No virus found in this incoming message. > > Checked by AVG Free Edition. > > Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: > > 11/18/2007 > > 5:15 PM > > > > > > No virus found in this outgoing message. > > Checked by AVG Free Edition. > > Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: > > 11/18/2007 > > 5:15 PM > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007 > 5:15 PM > > > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.503 / Virus Database: 269.16.0/1137 - Release Date: 11/18/2007 > 5:15 PM > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php