πŸ“š Node [[mail]]
πŸ““ garden/communecter/04 - Documentation technique/process/mail.md by @communecter

Mail

mails are scheduled and saved in collection cron can be tested with

http://127.0.0.1/co2/test/displayMail/id/5f2c0f1fe2f07eb9098b4590

AJax

var msg="<span style='white-space: pre-line;'>"+$("#send-mail-admin #message-email").text()+"<br/></span>"+aObj.mailTo.defaultRedirect(elt, type, id);
    
var params={
    tplMail : $("#send-mail-admin #contact-email").val(),
    tpl : "basic",
    tplObject : $("#send-mail-admin #object-email").val(),
    html: msg
};
ajaxPost(
    null,
    baseUrl+"/co2/mailmanagement/createandsend",
    params,
    function(data){ 
        toastr.success("Le mail a été envoyé avec succès");
    }
); 
var financerId = answerObj.answers.murir.planFinancement[posFinance].financer;
var contactList = {};
contactList[ financerId ] = { type:"<?php echo Organization::COLLECTION?>" };
contactList[ answerObj.user ] = { type:"<?php echo Person::COLLECTION?>" };
mylog.log("answer/sendmail",contactList);
ajaxPost(
    null,
    baseUrl+"/survey/answer/sendmail/id/"+answerId,
    { 
        contactList : contactList, 
        tpl : "default",
        tplObject : "[CTE] Changement de Status Financement : "+answerObj.answers.murir.planFinancement[posFinance].title ,
        generateHTML : "costum.views.custom.mails.notifs", 
        step : "<?php echo @$answer["step"] ?>" },
    function(data){ 
        toastr.success("Un mail a Γ©tΓ© envoyΓ© Γ  toutes les parties prenantes afin de les notifier");
        prioModal.modal('hide');
        urlCtrl.loadByHash(location.hash);
    }
);

PHP

CreateAndSendAction
$res = Mail::createAndSend($_POST);
$res=self::getCustomMail($res, $fromMail);
Mail::schedule($res);

collection CRON

πŸ““ garden/communecter/en/04 - Documentation technique/process/mail.md by @communecter

Mail

mails are scheduled and saved in collection cron can be tested with

http://127.0.0.1/co2/test/displayMail/id/5f2c0f1fe2f07eb9098b4590

AJax

var msg="<span style='white-space: pre-line;'>"+$("#send-mail-admin #message-email").text()+"<br/></span>"+aObj.mailTo.defaultRedirect(elt, type, id);
    
var params={
    tplMail : $("#send-mail-admin #contact-email").val(),
    tpl : "basic",
    tplObject : $("#send-mail-admin #object-email").val(),
    html: msg
};
ajaxPost(
    null,
    baseUrl+"/co2/mailmanagement/createandsend",
    params,
    function(data){ 
        toastr.success("Le mail a été envoyé avec succès");
    }
); 
var financerId = answerObj.answers.murir.planFinancement[posFinance].financer;
var contactList = {};
contactList[ financerId ] = { type:"<?php echo Organization::COLLECTION?>" };
contactList[ answerObj.user ] = { type:"<?php echo Person::COLLECTION?>" };
mylog.log("answer/sendmail",contactList);
ajaxPost(
    null,
    baseUrl+"/survey/answer/sendmail/id/"+answerId,
    { 
        contactList : contactList, 
        tpl : "default",
        tplObject : "[CTE] Changement de Status Financement : "+answerObj.answers.murir.planFinancement[posFinance].title ,
        generateHTML : "costum.views.custom.mails.notifs", 
        step : "<?php echo @$answer["step"] ?>" },
    function(data){ 
        toastr.success("Un mail a Γ©tΓ© envoyΓ© Γ  toutes les parties prenantes afin de les notifier");
        prioModal.modal('hide');
        urlCtrl.loadByHash(location.hash);
    }
);

PHP

CreateAndSendAction
$res = Mail::createAndSend($_POST);
$res=self::getCustomMail($res, $fromMail);
Mail::schedule($res);

collection CRON

πŸ““ garden/jakeisnt/pages/mail.md by @jakeisnt

Checking and interacting with mail.

email ideas:

  • generate arb. email name with the same domain per website, using email similar to web name
  • fwd these emails to central repo
  • know exactly what service these emails came from
  • quick frontend to generate these email addresses/inboxes for subscriptions

Decorum

How to send and reply to email Use plaintext email

Setting up a NixOS email server

I used Vultr’s VPS; install NixOS with it adding the ISO with these instructions, or using the ISO included with Vultr. (You’ll still have to manually partition and install NixOS though).

There are several nice preconfigured mail server options. I chose nixos-simple-mailserver and run NixOS 20.09, managed with flakes and merged into my system configurations. The documentation for the mail server is superb. This article might also be useful but could be dated.

As part of the instructions, you’ll have to set up a reverse DNS record. Here’s how you handle that for Vultr.

On Namecheap, the DNS records took several hours to propagate. The LetsEncrypt certificates in this mail server cannot be issued until your DNS records go into effect, so be patient until this happens.

Thunderbird configuration

  • Add new calendar with the specific calendar link off Radicale (Counted as calendar account on android but just one calendar on thunderbird).
  • CardBook extension to synchronize contacts over CardDAV.

Loading pushes...

Rendering context...