1.2.2 • Published 4 years ago

vepatekautomailer v1.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Projenin Açıklaması - Description of the Project

bu npm paketi sayesinde geliştirdiğiniz projenizde mail gönderme kurgusu varsa bu kurguyu sizin yerinize kontrol eden ve gönderilen maillerin geri dönüşlerini alabileceğiniz bir yapıya sahip olacaksınız.

If you develop your project editing sending mail through this NPM package which controls this fiction for you and you will have a structure where you can get the return of mails sent.

Şu an ki kurguda mail templateleri ve mail gönderme verileri MSSQL Server veri tabanında tutulacak şekildedir. İleriki zamanlarda MongoDB versiyonu da eklenecektir.

In the current setup, mail templates and mail sending data are kept in the MSSQL Server database. MongoDB version will be added in the future.

öncelikle aşağıda kodu indiriniz - first download the code below

npm i VepatekAutoMailer

Yükleme tamamlandıktan sonra projenizin içinde gerekli parametreleri tanımlamanız gerekmektedir. Bu parametreler; “MSSQL Server Adı”, “MSSQL Kullanıcı Adı”, “Şifre” ve “Veri Tabanı Adı” mevcut olmalıdır. Bunun yanında sistemin mail gönderebilmesi için mail hesap bilgilerinin de tanımlanması gerekmektedir.

After the installation is complete, you need to define the necessary parameters in your project. These parameters; "MSSQL Server Name", "MSSQL User Name", "Password" and "Database Name" must be available. In addition, in order for the system to send mail, mail account information must also be defined.

Aşağıda örnek bir tanımlama mevcut.

Below is an example description.

örn:

var trasport =  {
    host: "example.example.com",
    port: 465,
    secure: true,
    auth: {
        user: "example@example.com",
        pass: "example"
    },
    logger: false,
    debug: false // include SMTP traffic in the logs
};
var mailfrom=
{
    // default message fields
    // sender info
    from: 'info <example@example.com>',
    headers: {
        'X-Laziness-level': 1000 // just an example header, no need to use this
    }
}
var sqlsett={
    user: 'example',
    password: 'example',
    server: 'example\\example',
    database: 'example'
}
mailler.startMailler(sqlsett,trasport,mailfrom,30000,'https://example.example.com','https://www.example.com/example/example');

bu işlem sonrasında projenizi çalıştırdığınız zaman tanımladığınız veri tabanınıza 3 adet tablo, 1 adet prosedür ve 1 adet fonksiyon oluşturulacaktır.

After this process, 3 tables, 1 procedure and 1 function will be created in the database you defined when you run your project.

Projenin Çalışma Kurgusu - Working Setup of the Project

  1. MailTemplates Tablosu:

Toplu atılacak maillerde belirlenen mail şablonlarının ve bu şablonlara bağlı verilerin hangi tablodan çekileceği bilgisinin tutulduğu tablodur. İlgili parametreler doldurulup roje çalıştırıldığı zaman MailTemplates tablosu içerisinde örnek şablon ile birlikte oluşturulur. Bu şablon yine oluşturulacak "exampletable" tablosundan veri alacak şekilde kurgulanmıştır. Siz kendi tablolarınızı ekleyip kurguyu genişletebilirsiniz.

MailTemplates tablosundaki şablonda field nameleri ve tablo adını örnekteki gibi vermeniz gerekmektedir.

This is the table where the mail templates determined and the information related to these templates will be taken from the table in the mails to be sent in bulk. When the relevant parameters are filled and the project is run, it is created in the MailTemplates table together with the sample template. This template is designed to take data from the "exampletable" table to be created. You can add your own tables and expand the setup.

In the template in the MailTemplates table, you need to give the field names and the table name as in the example.

<b>Merhaba {{FirstName}} {{LastName}},</b>
  1. MailTransaction Tablosu:

Bu tablo gönderilecek maillerin tutulduğu tablodur. Bu tabloya yeni kayıt etkendiğinde issend=0 olmalıdır. issendi=0 olan kayıtlar sırası ile işlenir ve sonrasında gönderilen her bir mailin ilgili kaydında issend alanı 1 olarak güncellenir.

This table is the table where the mails to be sent are kept. It should be "issend = 0" when new records are affected in this table. Records with "issendi = 0" are processed sequentially and the issend field is updated as 1 in the relevant record of each mail sent afterwards.

  1. exampletable Tablosu:

Hazırlanan mail şablonları ile kendi veri tabanınızdaki verilerin ilişkilendirilmesine örnek olması için hazırlanmış bir tablodur.

It is a table prepared to be an example to associate the prepared mail templates with the data in your own database.

  1. GetMailForSend Prosedürü :

Bu prosedür MailTransaction tablosunda gönderilmesi gereken mailleri çekip ilgili templatein ilişkili tablolardan gerçek verilerni doldurur.

This procedure pulls the mails that need to be sent in the MailTransaction table and fills the actual data of the relevant template from the related tables.

  1. replaceTR Fonksiyonu :

türkçe karakterlerde oluşan hataların düzeltilmesi için hazırlanmış bir fonksiyondur.

It is a function prepared for correcting errors in Turkish characters.

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago