Definition at line 9 of file email_helper.inc.
◆ buildContactUsForm()
static EmailHelper::buildContactUsForm |
( |
|
$form, |
|
|
|
$requiredMessage = true |
|
) |
| |
|
static |
Definition at line 32 of file email_helper.inc.
38 $form->data->set(
"full_name",
$user->first_name .
" " .
$user->last_name);
40 $form->readOnly(
"full_name",
"email");
43 $form->required(
"full_name",
"email",
"subject");
44 if ($requiredMessage)
$form->required(
"message");
46 $form->submitLabel =
"Send";
47 $form->formCSS =
"form";
48 $form->regexp(
"email",
"\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b",
"Please supply a valid email address containing a domain name.");
50 $form->alias(
"email",
"Your Email");
54 $aboutSelect =
new SelectFieldRenderer(
$form,
"contact_topic_id" ,
"About",
$topicList);
58 $form->hide(
"contact_topic_id");
65 $captchaMgr->addCaptchaToForm(
$form);
Provides a central management class for event handlers and common functionality for the captcha compo...
sendContactUs($form)
customSaveHandler callback for contact_us form.
static getValue($component, $name)
Retrieve the value of the specified Setting.
◆ displaySendResultMessage()
static EmailHelper::displaySendResultMessage |
( |
|
$msg | ) |
|
|
static |
Definition at line 11 of file email_helper.inc.
18 $text =
"Your message has been sent.";
23 $text =
"The email could not be sent. Please contact <a href=\"mailto:{$config['email_contact']}\">{$config["email_name
"]}</a> for help.";
28 echo
"<div id='message_send_result' class='{$class}'>{$text}</div>\n";
◆ sendContactUs()
EmailHelper::sendContactUs |
( |
|
$form | ) |
|
customSaveHandler callback for contact_us form.
Create a dummy EmailTemplate to store the email details and send using EmailManager.
- Parameters
-
- Returns
- boolean
Definition at line 82 of file email_helper.inc.
107 $email->message =
"Message From: {$contactUs->full_name} {$contactUs->email}</br></br>" .
$contactUs->message;
117 $form->msg =
"Email send failed.";
Takes an email template and an obj of any DataItem class and sends email to a list of recipients afte...
The documentation for this class was generated from the following file: