HomeJavaModsMailLibrary
MailLibrary
MailLibrary API
MailLibrary plugin its an API to help developers send emails in an easy way. This plugins uses JavaMail API which is included as dependency inside the jar.

Configuration

Code (Text):
config:
  #default email to send mails
  mailTo: [email protected]
  #Name of the mail owner
  senderName: Your Network Name
  #info about your email server, gmail by default
  host: smtp.gmail.com
  port: 587
  #your account info
  emailAccount: [email protected]
  emailPassword: myPassword
metrics:
  enabled: true
Click to expand...
Commands

Perms

Installation
  1. Drop .jar inside plugins folder
  2. Start the server
  3. Change your info at config.yml and reboot or reload the plugin

Dev Usage
Code (Text):
   private MailLibrary mailLibrary;

    /**
     * Validate that we have access to MailLibrary
     *
     * @return True if we have PlayerPoints, else false.
     */
    private boolean hookMailLibrary() {
        final Plugin plugin = this.getServer().getPluginManager().getPlugin("MailLibrary");
        mailLibrary = MailLibrary.class.cast(plugin);
        return mailLibrary != null;
    }

    public MailLibrary getMailLibrary() {
        return mailLibrary;
    }

    public void sendMail(String subject, String body){
        try {
            if(mailLibrary!=null)
                mailLibrary.sendMail(subject, body);
        } catch (Exception e){
            e.printStackTrace();
        }
    }

    public void sendMailSync(String subject, String body){
        try {
            if(mailLibrary!=null)
                mailLibrary.sendMailSync(subject, body);
        } catch (Exception e){
            e.printStackTrace();
        }
    }

    public void onEnable(){
       hookMailLibrary();
    }
 
Click to expand...
Plugins Using this API

None at this moment, I will upload one tool for admins using this api after this plugin its accepted.

Source code
https://github.com/kunpapa/MailLibrary

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

MailLibrary is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10. Downloaded 136 times (via Spigot). Download it and open it directly in the game.

Explore more