Feature #12344 » linkvalidator-swiftmailer_v4.diff
/home/miousse/typo3svn/linkvalidator/classes/tasks/class.tx_linkvalidator_tasks_validate.php (working copy) | ||
---|---|---|
if (t3lib_div::validEmail($modTS['mail.']['fromemail'])) {
|
||
$mail->setFrom(array($modTS['mail.']['fromemail'] => $modTS['mail.']['fromname']));
|
||
} else {
|
||
$failure = t3lib_div::makeInstance(
|
||
'Exception',
|
||
throw new Exception(
|
||
$GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.error.invalidFromEmail'),
|
||
t3lib_FlashMessage::ERROR
|
||
time()
|
||
);
|
||
throw $failure;
|
||
$sendEmail = FALSE;
|
||
}
|
||
if(t3lib_div::validEmail($modTS['mail.']['replytoemail'])) {
|
||
$mail->setReplyTo(array($modTS['mail.']['replytoemail'] => $modTS['mail.']['replytoname']));
|
||
... | ... | |
if(!empty($modTS['mail.']['subject'])) {
|
||
$mail->setSubject($modTS['mail.']['subject']);
|
||
} else {
|
||
$failure = t3lib_div::makeInstance(
|
||
'Exception',
|
||
throw new Exception(
|
||
$GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.error.noSubject'),
|
||
t3lib_FlashMessage::ERROR
|
||
time()
|
||
);
|
||
throw $failure;
|
||
$sendEmail = FALSE;
|
||
}
|
||
if (!empty($this->email)) {
|
||
$emailList = t3lib_div::trimExplode(',', $this->email);
|
||
... | ... | |
$emailList = t3lib_div::trimExplode(',', $this->email);
|
||
foreach ($emailList as $emailAdd) {
|
||
if (!t3lib_div::validEmail($emailAdd)) {
|
||
$isValid = FALSE;
|
||
$failure = t3lib_div::makeInstance(
|
||
'Exception',
|
||
throw new Exception(
|
||
$GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.error.invalidToEmail'),
|
||
t3lib_FlashMessage::ERROR
|
||
time()
|
||
);
|
||
throw $failure;
|
||
$sendEmail = FALSE;
|
||
} else {
|
||
$validEmailList[] = $emailAdd;
|
||
}
|