RE: [PHP] two small issues with php mail
| From: | Brad | Date: | Tue, 20 Nov 2007 02:17:37 +0000 |
| Subject: | RE: [PHP] two small issues with php mail | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264833@lists.php.net to get a copy of this message | ||
Responses like that is encouragement to drop php and move straight to ruby!
-----Original Message-----
From: replies-lists-b2z2-php@listmail.innovate.net
[mailto:replies-lists-b2z2-php@listmail.innovate.net]
Sent: Monday, November 19, 2007 9:07 PM
To: Brad
Subject: RE: [PHP] two small issues with php mail
I'm sorry, but if you have to ask this question you need to get
yourself a tutor - the intent of this mailing list is not that.
- Rick
------------ Original Message ------------
> Date: Monday, November 19, 2007 08:52:36 PM -0500
> From: Brad <brads@ftnco.com>
> Cc: php-general@lists.php.net
> Subject: RE: [PHP] two small issues with php mail
>
> This is a new trick for me, can you kindly explain?
> I know what you are getting at, I am just not real sure on th
> method?
>
> Do I just replace "mail" and the end with print?
> Aka
> mail($email, $subject, $body, $headers);
> with
> print($email, $subject, $body, $headers);
>
> ??
>
> -----Original Message-----
> Sent: Monday, November 19, 2007 8:44 PM
> To: Brad
> Subject: RE: [PHP] two small issues with php mail
>
> well, you need to do some basic debugging.
>
> a) replace your mail() function with print statements and review the
> output to make certain that it is correct. [this will require that
> you look at appropriate documentation to see how message
> headers/body should be formatted.]
>
> b) if "a)" looks right, then look at your mail server's logs to see
> what shows up there.
>
> - Rick
>
>
> ------------ Original Message ------------
>> Date: Monday, November 19, 2007 08:19:49 PM -0500
>> From: Brad <brads@ftnco.com>
>> To: 'Philip Thompson' <philthathril@gmail.com>
>> Cc: php-general@lists.php.net
>> Subject: RE: [PHP] two small issues with php mail
>>
>> It makes sense, but the Bcc is still not making it through.
>>
>> Not sure if the smtp portion is correct either.
>> No parse errors, but no email from the bcc either.
>>
>> <?
>> $email = $_REQUEST['email'];
>> $fromaddress = 'admin@ggggggggggggggggg.com';
>> $fromname = 'Zone of success Club'; $eol = "\r\n";
>> $smtp = "localhost";
>> $headers = 'From: '.$fromname.'
>> <'.$fromaddress.'>'.$eol;
>> $headers .= 'Bcc: webmaster@gggggggggg.com'; $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.ggggggggggggg.com/freePDF/autopilotebook.pdf">"Cli
>> ck ME"</a> Here is your FREE autopilot book!!!!';
>> mail($email, $subject, $body, $headers);
>> ?>
>>
>>
>>
>> -----Original Message-----
>> From: Philip Thompson [mailto:philthathril@gmail.com]
>> Sent: Monday, November 19, 2007 7:00 PM
>> To: php-general@lists.php.net
>> Subject: Re: [PHP] two small issues with php mail
>>
>> On Nov 19, 2007 5:52 PM, Brad <brads@ftnco.com> 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
>>
>
> ---------- End Original Message ----------
>
> 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
>
---------- End Original Message ----------
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