GithubHelp home page GithubHelp logo

hardsoft321 / suitecrm-sugarbeanmailer Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 14 KB

Class to send mails like in SugarBean and interface to send copies

License: Other

PHP 56.27% JavaScript 22.36% Smarty 21.37%
suitecrm

suitecrm-sugarbeanmailer's Introduction

SugarBeanMailer - класс для отправки почты


NotificationCopy - поле для выбора пользователей, которым придет уведомление
о создании записи.

В нужный модуль добавить поле в словарь
$dictionary[<Module>]['fields']['NotificationCopy'] = array(
    'required' => false,
    'name' => 'NotificationCopy',
    'vname' => 'LBL_NOTIFY_ON_CREATE',
    'type' => 'function',
    'source' => 'non-db',
    'massupdate' => 0,
    'studio' => 'visible',
    'importable' => 'false',
    'duplicate_merge' => 'disabled',
    'duplicate_merge_dom_value' => 0,
    'audited' => false,
    'reportable' => false,
    'function' => array(
        'name' => 'NotificationCopy::getFieldHtml',
        'returns' => 'html',
        'include' => 'custom/include/NotificationCopy/NotificationCopy.php'
    ),
);

Добавить поле на форму editviewdefs/quickcreatedefs
array(
    'name' => 'NotificationCopy',
    'hideLabel' => true,
),

Добавить хук для отправки
array (
    'module' => <Module>,
    'hook' => 'after_save',
    'order' => 101,
    'description' => 'Send Notification Copy',
    'file' => 'custom/include/NotificationCopy/NotificationCopy.php',
    'class' => 'NotificationCopy',
    'function' => 'sendCopyAfterSave',
),

Для сохранения выбранного списка в базе добавьте поле в словарь
$dictionary[<Object>]['fields']['notify_to'] = array (
      'name' => 'notify_to',
      'vname' => 'LBL_NOTIFY_TO',
      'type' => 'multinum',
      'dbType' => 'text',
      'len' => '1000',
      'audited' => true,
);

Рекомендуется создать почтовый шаблон <Object>Created.

suitecrm-sugarbeanmailer's People

Contributors

eapunk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.