re: ContactForm coding question, $email alternate recipient
1. I would like to use some other email address other than that which is profiled in the system configuration, but I am a little confused about how to setup.
Should this line read, syntactically ?
$email = (isset($sendTo))? $sendTo : ’
[email protected]’;
-or-
$email = (isset($sendTo))? $sendTo : "
[email protected]";
-or-
//[[ContactForm? &sendTo=`
[email protected]`]]
$email = (isset($sendTo))? $sendTo : ’[[ContactForm? &sendTo=`
[email protected]`]]’;
2. $subject_array[] = "some value" , where is this used in the form or post. I understand the reasoning, but don’t see where or how the sender would select an appropriate subject ??
// Generic email to use for all parts. You can edit
// the individual instances for more control.
// Defaults to the built-in email notification account which is set in the System Configuration.
// Can be set by using as follows:
// [[ContactForm? &sendTo=`[email protected]`]]
$email = (isset($sendTo))? $sendTo : '[(emailsender)]';
// enter "static" in order to use the static subject line
$subject_type = "static";
$static_subject = "[Web Inquiry] ".$modx->config['site_url'];
// Otherwise use an array of possible subjects
$subject_array[] = "Survey Info";
$subject_array[] = "Company Info";
$subject_array[] = "Other Info";
// Recipient ... add or remove lines as needed
// Format (as few or as many as desired):
// $recipient_array["Your Text Here"] = '[email protected]';
$recipient_array["General Inquiries"] = "$email";
$recipient_array["Press or Interview Request"] = "$email";
$recipient_array["Partnering Opportunities"] = "$email";
// enter "static" in order to use the solo recipient
$recipient_type = "";
$static_recipient = "$email";
Thanks
Don