mcgyver7923 Posted June 16, 2003 Posted June 16, 2003 I have added another inquiry form based on that of contact us with many additional fields. I would like to have it e-mailed to a different e-mail address then the one specified by STORE_OWNER_EMAIL_ADDRESS. I'm aware of how to change the store owner email in admin, but I don't want to change that, I just want to add an additional variable. Where is the STORE_OWNER_EMAIL_ADDRESS variable located? I have searched the forums, but I can't seem to find an answer...I'm sure this is simple and I must be overlooking the answer somehow. Anyway, all help is greatly appreciated!! :D Thanks!!! :) -Richard --------------------------------------------------- Where would I be without the Forums?!?!
josheli Posted June 16, 2003 Posted June 16, 2003 it is stored in the database. the configuration table. all those config variables are fetched in application_top.php and defined as constants.... // set the application parameters (can be modified through the administration tool) $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION . ''); while ($configuration = tep_db_fetch_array($configuration_query)) { define($configuration['cfgKey'], $configuration['cfgValue']); }
mcgyver7923 Posted June 16, 2003 Author Posted June 16, 2003 Any suggetions on how to add another variable? I'm still not shure how to do what I want to do. Maybe there is just an easy way in the new contact_us.php (i named it partner_inquyiry.php) to forget the variable and just put the new e-mail address in..... Thanks for your help!!! :D -Richard --------------------------------------------------- Where would I be without the Forums?!?!
Guest Posted June 16, 2003 Posted June 16, 2003 Richard, You can just hardcode the second email address into that section of your new php file.
josheli Posted June 16, 2003 Posted June 16, 2003 at the top of 'contact_us.php' is this code: if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { if (tep_validate_email(trim($HTTP_POST_VARS['email']))) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $HTTP_POST_VARS['enquiry'], $HTTP_POST_VARS['name'], $HTTP_POST_VARS['email']); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; } } in your new form, just change STORE_OWNER_EMAIL_ADDRESS to the email address you want to use: tep_mail(STORE_OWNER, '[email protected]', EMAIL_SUBJECT, $HTTP_POST_VARS['enquiry'], $HTTP_POST_VARS['name'], $HTTP_POST_VARS['email']); or create a new variable and substitute that: if($form=='contact_us') { $sender = STORE_OWNER_EMAIL_ADDRESS; elseif($form=='new_contact_us_form') { $sender = '[email protected]'; } tep_mail(STORE_OWNER, $sender, EMAIL_SUBJECT, $HTTP_POST_VARS['enquiry'], $HTTP_POST_VARS['name'], $HTTP_POST_VARS['email']); or go straight to the php mail function, where the $to can be multiple addresses separated by commas: $to ='[email protected], [email protected], [email protected]'; $header = 'From: me <[email protected]>rn'; mail($to,$subject,$message,$header); http://www.php.net/manual/en/function.mail.php
mcgyver7923 Posted June 17, 2003 Author Posted June 17, 2003 Thanks to you all for your help!!!! I knew there was an easy way to do this :wink: Thanks again, it works like champ. All I did was hardcode the e-mail in to my new contact page :D -Richard --------------------------------------------------- Where would I be without the Forums?!?!
michael23 Posted March 6, 2004 Posted March 6, 2004 Hi, this was almost my question, but only almost. What can I do to add a second mail address in the store owner? I tried the same as in "send extra order e-mail to", but that did not work. Thx in advance Michael Not because it is difficult we don't dare to do it, but because we don't dare to do it, it is difficult. (Seneca)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.