News:

cpg1.5.48 Security release - upgrade mandatory!The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.[more]

Such an option doesn't exist, as such a feature currently doesn't exist. However, this could be added as a mod. I've currently no time to create this mod immediately. Please reply to this thread, so I can highlight it in my inbox and will create the mod later.

Αndré,Attached is a zipped patch file based on SVN 8660 that implements this feature for your review...As there is a change (one line addition) to language file - I assumed you would want a hidden config option in 1.5.x... and build into 1.6.

Summary:Insert a record into cpg_config with name 'contact_form_cc_sender_field' and value '1' to enable supportIf this option is set... AND (either a registered user OR guest and displaying email field to guest) - then an option will be displayed on contact.php to allow user to select 'Send me a copy of contact email'... (otherwise we have no way to get an email to cc to...)On submit, if a valid email is provided (registered user may not have email... guest email may be optional), and new config option is set - a CC will be added to the email using the sender email provided (in form or from registered user data).

Updated:contact.php: form additions and processing data on submitinclude/mailer.inc.php: updated function cpg_mail to receive and process $cc_sender using the AddCC function of the cpg_PHPMailer class.lang/english.php: add text for label on form for new field

//*GMC added cc field based on ('hidden' for 1.5) config option 'contact_form_cc_sender_field' - and if we have an emailid (USER_ID or $CONFIG['contact_form_guest_email_field']if ((USER_ID || $CONFIG['contact_form_guest_email_field'] != 0) && $CONFIG['contact_form_cc_sender_field']) {

$CONFIG['contact_form_guest_email_field']If we display that option for guests, spammers could easily use the contact form to send spam via a Coppermine gallery. Even if we enable it just for registered users, we cannot say without fail if the email address entered during the registration really belongs to the user, as the admin has the choice if he wants his users to validate the email address during registration. I introduced a database column "user_email_valid" in cpg1.5.10, which is the only way to determine without fail if an email address is valid, and it won't work in bridged galleries. This results in a situation that the option isn't displayed for all users for sure or at all.

For that reason I don't want to add this feature to the core code.

Of course it could be implemented as plugin. We could use captcha_contact_print to display the option and probably another existing hook like page_start to send the email (instead of using the Cc option, just send a separate email). If not, we need to add a new plugin hook. To make this clear, I've no interest in creating such a plugin, but am ready to help to find/create the plugin needed hook(s).

If we display that option for guests, spammers could easily use the contact form to send spam via a Coppermine gallery. Even if we enable it just for registered users, we cannot say without fail if the email address entered during the registration really belongs to the user, as the admin has the choice if he wants his users to validate the email address during registration. I introduced a database column "user_email_valid" in cpg1.5.10, which is the only way to determine without fail if an email address is valid, and it won't work in bridged galleries. This results in a situation that the option isn't displayed for all users for sure or at all.

Leave it to spammers to ruin a perfectly good idea... sigh... You are right of course - any valid email entered by a guest would be used - and most certainly result in spam... I know I've had many registrations from spammers - I happen to force validation so they never get activated (but I didn't check that in the sample provided)... (I've now either turned off registrations or added a master password so they have to ask me first (or auto register members in the background..) Got tired of cleaning out the garbage...)

Quote

Of course it could be implemented as plugin. We could use captcha_contact_print to display the option and probably another existing hook like page_start to send the email (instead of using the Cc option, just send a separate email). If not, we need to add a new plugin hook. To make this clear, I've no interest in creating such a plugin, but am ready to help to find/create the plugin needed hook(s).

If going down the plugin route - two hooks in cpg_mail already: cpg_mail_to_email and cpg_mail_sender_email.cpg_mail_to_email filters the 'to' array - would be simple to add a recipient here.. at least for a registered verified email (for unbridged...) It will get added to the email To field upon return.cpg_mail_sender_email filters the sender email... but the mail object hasn't been instantiated yet.

I like the idea from twoclones... but now I'm not seeing a safe way to implement.