0
If you want to send the E-Mails in a more formatted way, here is the code to change. E-Mails will be send with a formatted table. This automatically applies to the admin mail and the mail sent to the submitter.
(would be nice if this could be included in official build).
(would be nice if this could be included in official build).
b2jadminmailer.php
public function Process()
{
$mail = JFactory::getMailer();
$mail->isHTML(true); // beadsoft.de
$this->set_from($mail);
...
b2jdispatcher.php:
protected function body()
{
$result = '';
foreach ($this->FieldsBuilder->Fields as $key => $field)
{
switch ($field['Type'])
{
case 'sender':
case 'text':
case 'textarea':
case 'dropdown':
case 'checkbox':
case 'date':
$result .= $this->AddToBody($field);
}
}
foreach ($this->FieldsBuilder->DynamicFields as $key => $field)
{
if($field[0]->state != 0){
foreach ($field[1] as $dynamicfield){
$result .= $this->AddToBodyDynamic($dynamicfield);
}
}
}
$result .= '' . PHP_EOL;
return $result;
}
protected function AddToBody(&$field)
{
if (!$field['Display']) return "";
return "'' . " . JFilterInput::getInstance()->clean($field["Name"], "") . ': ' . PHP_EOL . JFilterInput::getInstance()->clean($field["Value"], "") . '' . PHP_EOL . PHP_EOL;
}
protected function AddToBodyDynamic(&$field)
{
if ($field->b2jFieldState == 0) return "";
return '' . JFilterInput::getInstance()->clean($field->b2jFieldName, "") . ': ' . PHP_EOL . JFilterInput::getInstance()->clean($field->b2jFieldValue, "") . '' . PHP_EOL . PHP_EOL;
}
Your Reply

Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »