private function mailCondolatie($condoleantie, $overledene) { $email = Email::forge(); // check for valid given email address; UNTESTED CODE BLOCK if (filter_var($condoleantie->email, FILTER_VALIDATE_EMAIL)) { $email->from("uitvaartzorg@van-dael.be", "Uitvaartzorg Van Dael"); $email->to($condoleantie->email, $condoleantie->naam); $email->reply_to($condoleantie->email, $condoleantie->naam); //incompatible with legacy mail package } else { throw new HttpServerErrorException; } // check if deceased has a family email address if (!empty($overledene->email_familie)) { // check of emails are seperated by dot-comma if (strpos($overledene->email_familie, ';')) { $addresses = explode(';', str_replace(' ', '', $overledene->email_familie)); } // check of emails are seperated by comma elseif (strpos($overledene->email_familie, ',')) { $addresses = explode(',', str_replace(' ', '', $overledene->email_familie)); } elseif (!strpos($overledene->email_familie, ',') and !strpos($overledene->email_familie, ';')) { // single email address was probably given $addresses = $overledene->email_familie; } $email->bcc($addresses); } else { // no email address was given, do nothing } // owner's e-mail address $owner_email = Config::get('inmemoriam.email_administrator'); if (!empty($owner_email) && filter_var($owner_email, FILTER_VALIDATE_EMAIL)) { $email->bcc($owner_email); } else { throw new Exception("Administrator email was not set or invalid."); } // verzender's e-mail adres $email->bcc($condoleantie->email, $condoleantie->naam); $email->subject('Nieuwe condolatie voor ' . $overledene); $data['bericht'] = $condoleantie->bericht; $data['afzender'] = $condoleantie->naam; $data['adres'] = $condoleantie->adres; $data['plaats'] = $condoleantie->plaats; $email->html(View::forge('mails/condolatie', $data, false)); try { $email->send(); } catch (EmailValidationFailedException $e) { throw $e; exit; } catch (EmailSendingFailedException $e) { throw $e; exit; }
Harro Verton wrote on Sunday 8th of April 2012:This forum isn't really for bug reports. Please add an issue for this at http://github.com/fuel/email/issues so someone can have a look and it can be followed up.
It looks like you're new here. If you want to get involved, click one of these buttons!