Новости | FAQ | Авторы | Документация | В действии | Библиотека |
Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
Ike 18.05.2006 17:15
Клиент утверждает что получателям дошло чуть ли не по семь писем.@sent_maillist[] $selectQueye[^table::sql{SELECT id, recipient_id, content_id FROM spool LIMIT 0, 100}] ^selectQueye.menu{ $selectAdress[^table::sql{SELECT name, mail, gender FROM maillist WHERE id = '$selectQueye.recipient_id'}] $selectContent[^table::sql{SELECT header_$selectAdress.gender AS header, text, file_1, file_2, file_3 FROM content WHERE id = '$selectQueye.content_id' }] ^if(def $selectAdress && def $selectContent){ $name[^$selectAddres.name] $head[^process{$selectContent.header}] ^if(def $selectContent.file_1){$file1[^file::load[binary;attach/$selectContent.file_1]]} ^if(def $selectContent.file_2){$file2[^file::load[binary;attach/$selectContent.file_2]]} ^if(def $selectContent.file_3){$file3[^file::load[binary;attach/$selectContent.file_3]]} ^try{ ^mail:send[ $.from[timur@bitobe.com] $.x-mailer[Parser 3.2.1] $.to[$selectAdress.mail] $.subject[sub] $.charset[UTF-8] $.text[^untaint{^process{$head}} ^untaint{$selectContent.text} ] $.file[$file1] $.file1[$file2] $.file2[$file3] ] }{ $exception.handled(1) $log[ e-mail: $selectAdress.mail type: $exception.type source: $exception.source file: $exception.file line: $exception.lineno collumn:$exception.colno $exception.comment ] ^log.save[append;maillist_errors.txt] } ^void:sql{DELETE FROM spool WHERE id = $selectQueye.id} } }