Right -- I've used mail() recently, see
http://us2.php.net/manual/en/ref.mail.php
it does everything you need and the package or library you're having trouble
with is likely just a wrapper for it.
I'm not familiar with what you mentioned -- is it a PEAR lib?

And I'll second Larry's advice, lock down your mail forms to avoid
spoofing/abuse.  If you have any hidden form elements that don't change,
they should prolly not be in the form at all -- or merely overridden by the
following PHP (although leaving a non-used hidden form element might
frustrate someone who is trying to abuse it, it will also frustrate the next
coder who tries to work on the script(s) :)

all the best,

   Ben


On 11/22/06, larry price <[EMAIL PROTECTED]> wrote:

What does the documentation for Mail::factory say?

I'm just guessing here but are the keys to the dictionary you are
passing to the Mail object case-sensitive?

http://pear.php.net/reference/Mail-1.1.3/Mail/Mail.html

doesn't say.

You don't have magic_quotes turned on in your php.ini do you, that can
sometimes mess things up.


I'm hoping that you are sanitizing the input variables somewhere else,
since it would be easy for someone to pass a POST variable with

in_to=\r\nCc: [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]
Mortgage R8z ReFi

Just because your form specifies an option does not mean that only
options specified will be sent. liberal use of stripslashes() helps a
lot.


On 11/22/06, Matthew Jarvis <[EMAIL PROTECTED]> wrote:
> Today's struggle is wrestling with an old program to get it to CC
> someone when it sends out emails.
>
> User is in a form, selects "From" and "To". Enters text into a text box.
> Hits the Send button. This all works.
>
> Trying to CC our Service manager on these things and can't get it to
work.
>
> Here's a cut of the code:
>
>
>          if (isset($in_body))
>          {//save the note then close this screen
>             $in_body = $in_who . ':   ' . $in_body;
>             $headers['From']    = $in_who;
>
>             //$headers['To']      = $in_to . ',[EMAIL PROTECTED]';
>             $headers['To']      = $in_to;    //this is the original line
>
>             $headers['CC']      = "[EMAIL PROTECTED]";
>
>             $headers['Subject'] = $in_subject;
>             //$params ['sendmail_path'] = '/usr/lib/sendmail';
>             $params ['host'] = "whatever.com";
>             $params ['port'] = 25;
>             $params ['auth'] = false;
>             $params ['username'] = '';
>             $params ['password'] = '';
>             $mail_object =& Mail::factory('smtp', $params);
>             $mail_object->send($in_to,$headers,$in_body);
>             echo ('<script LANGUAGE="JAVASCRIPT">');
>             echo ('close();');
>             echo ('</script>');
>          }
>
>
> I've left some snippets in there as examples of what I've been trying,
> such as appending an email addy to the "To" param, stuffing it in the
> 'CC' of the header, etc.
>
> The code for the Mail.php says that if addy's come in in a comma
> seperated list that it parses them out.
>
> No joy....
>
> Any help out there?
>
> --
> Matthew S. Jarvis
> IT Manager
> Bike Friday - "Performance that Packs."
> www.bikefriday.com
> 541/687-0487 x140
> [EMAIL PROTECTED]
> _______________________________________________
> EUGLUG mailing list
> [email protected]
> http://www.euglug.org/mailman/listinfo/euglug
>
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to