de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 email api script
PostPosted: Sun Jan 07, 2018 9:01 pm 
Offline
Regular
Hi everyone,

since i'm really new to sexscript and programming in general i wonder if it would be possible to reintroduce the "real" email function in for example Mandys Blackmail, or just for private use.
Would a groovy script (of course with changes to the actual Mandy Blackmail script from here) like this work:

Code:
import javax.mail.*
import javax.mail.internet.*
/*

Get Any JAVAMAIL Dependency
===============================
Download JAVAMAIL dependency that you need.
download JAVAMAIL at : https://maven.java.net/content/repositories/releases/com/sun/mail/javax.mail/1.5.2/javax.mail-1.5.2.jar
To install, copy & paste the *.jar to installed Groovy lib directory:
eg: C:\Program Files (x86)\Groovy\Groovy-2.1.1\lib

*/


public class SMTPAuthenticator extends Authenticator
{
    public PasswordAuthentication getPasswordAuthentication()
    {
        return new PasswordAuthentication('email@gmail.com', 'password111');
    }
}

def  d_email = "email@gmail.com",
     d_uname = "email@gmail.com",
     d_password = "password111",
     d_host = "smtp.gmail.com",
     d_port  = "465", //465,587
     m_to = "email@astrums.net",
     m_subject = "Testing",
     m_text = "Hey, this is the testing email."

def props = new Properties()
props.put("mail.smtp.user", d_email)
props.put("mail.smtp.host", d_host)
props.put("mail.smtp.port", d_port)
props.put("mail.smtp.starttls.enable","true")
props.put("mail.smtp.debug", "true");
props.put("mail.smtp.auth", "true")
props.put("mail.smtp.socketFactory.port", d_port)
props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory")
props.put("mail.smtp.socketFactory.fallback", "false")

def auth = new SMTPAuthenticator()
def session = Session.getInstance(props, auth)
session.setDebug(true);

def msg = new MimeMessage(session)
msg.setText(m_text)
msg.setSubject(m_subject)
msg.setFrom(new InternetAddress(d_email))
msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to))

Transport transport = session.getTransport("smtps");
transport.connect(d_host, d_port, d_uname, d_password);
transport.sendMessage(msg, msg.getAllRecipients());
transport.close();


or would that solution only work with access to the source code of sexscript?

greets

Franky


Top
 Profile Send private message 
 
 Re: email api script
PostPosted: Sun Jan 07, 2018 10:16 pm 
Offline
Site Admin
User avatar
Yes, this can work,
  • with some valid SMTP credentials.
  • integrating the jar like here


Top
 Profile Send private message 
 
 Re: email api script
PostPosted: Sun Jan 07, 2018 10:56 pm 
Offline
Regular
doti wrote:
Yes, this can work,
  • with some valid SMTP credentials.
  • integrating the jar like here

Ok good to know, then i think it's time for me to get deeper into groovy and java ;)


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.