Errors with a net.mail.send variant
I'm a really big Java newbie, so please bear with me.
I've been trying to get it so that my Patcher can send email using any server that allows SMTP. I'm essentially adding some extra functions to some code and a patch by forums member Myer Nore (posted here: https://cycling74.com/forums/net-mail-problems)
My main frustration is getting the int in for the port. I initially did it as a string, but it seemed like that was being rejected. I've changed a few things around, including adding a section where the string is converted to an int, but I must have done something wrong, since it didn't work.
I've also tried patching in a number box instead of a textbox, but no luck there either.
Here is the patch:
And I've attached the java files. MXJGmail3 is the code form Myer Nore. MXJEmail3 is my attempt at tacking extra features on.
(bump)
I've been playing with this again, and I still cannot get [mxj list.replace] to change an the int for port in java. Any ideas?
Welp, I've figured out how to get ints in to Java a little easier. All I had to do was use a message like "Port 25" sent in, and it assigns itself. No list.replace required.
However, I've been having a new problem. Since I share my project online, I'd like to make it work anybody's mail options. I've gotten it to work with Gmail and google-apps based emails. I started to test it with a hotmail account, but it isn't working. I get an error that asks if I have "Plaintext Connection?" - from what I read, this is meaning that the TLS handshake isn't working, or that for some reason, it doesn't recognize the SSL connection. Here is what my java is using for authentication, I think:
//Deliver Mail Function
public void deliver() {
//Get System Properties object
Properties props = System.getProperties();
//Enable TLS
props.put( "mail.smtp.starttls.enable", "true");
// Define properties
props.put( "mail.transport.protocol", "smtps" );
props.put( "mail.smtp.host", "host" );
props.put( "mail.smtp.auth", "true" );
Er, also, it's worth noting here that these are the settings for login using ssl/tls, though not every connection will use that, obviously.
erp doublepost