[LIB] Email - Send Emails From Plugins!

Discussion in 'Resources' started by Icyene, Sep 21, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    MrInspector

    Used this lib and the other one he said to use, both really don't work for me.

    It just lags out and disconnects me from the server when I try to send a email.
     
  2. Offline

    DrJava

    *Steels idea*
    *Makes Plugin*
    *6969696969696969696969 Downloads*
     
  3. Offline

    Scullyking

    DrJava Go for it :p I have a big-ass project on the go atm.
     
  4. Offline

    DrJava

    I was just kiding. Me too. :p
     
  5. i got an error
    INFO 530 5.7.0 Must issue a STARTTLS command first.
     
  6. Offline

    DevRosemberg

    Gist is down.
     
  7. Offline

    GermanCoding

    I modified the gist of IvyBits, because I had lots of problems with it. The code can send Emails with all providers that supports SMTP with StartTLS. My version is available here. And here is a short code example how to use it:

    Code:java
    1. SMTP.sendEmail("smtp.gmx.de", //The address of the smtp server
    2. "My-Email(at)gmx.de", //Sender email-address
    3. "My-Password", //Sender password for login
    4. "My-Name", //Sender name
    5. "Recipient", //Name of the recipient
    6. "Recipient-Email(at)...com", //Email of the recipient
    7. "Subject", //Subject of the email
    8. "Content", //Content of the email. You can use control characters like \n for a new line
    9. false); //Debug mode. If true the console logs the whole connection (spam?!)
    10.  


    I highly recommend to call the SMTP.sendEmail() function NOT on the main-thread or bukkit-thread, because sending an email costs up to 10 seconds of time.
     
  8. Offline

    gal0511Dev

    Icyene Hey Icyene The gist dosent work...
     
    Tommy Raids and Xx_LeetGamer_xX like this.
  9. Offline

    SmellyPenguin

Thread Status:
Not open for further replies.

Share This Page