April 22, 201015 yr Hi All, I'm having a really tough time getting the send email with authentication script to work in Scriptmaster sending SMTP to Gmail. I don't have any prior experience with javamail or groovy, so that's making it really tough to figure out. The problem I'm stuck at is issuing a start tls command. I've inserted this line: props.setProperty("mail.smtp.starttls.enable","true"); with no success. I started going back and trying to reconstruct a script based off of the send email (html formatted) script, and I just don't know enough about groovy or javamail to make this work at this time. It seems like there have got to be other folks who've made this work, but I can't find any working code through searching; it's conceivable that I could spend days or weeks learning this stuff just to send an email with HTML formatting through Filemaker. Thanks! Edited April 22, 201015 yr by Guest
April 22, 201015 yr Try some of the other solutions found in these threads. There are some other topics about this around on the forums as well. Give a try using a mail client like thunderbird or outlook. People often have their authentication or server information wrong when trying to send through google. http://fmforums.com/forum/showtopic.php?tid/202477/post/348005/hl/gmail/fromsearch/1/#348005 http://fmforums.com/forum/showtopic.php?tid/212102/post/344757/hl/gmail/fromsearch/1/#344757
April 23, 201015 yr Author Hi, I had found that first thread and tried inserting the line of code it mentions (which I also mentioned in my original post here). It seems to have no effect. The second thread is potentially helpful with some port information, but there's no information there on how I'd incorporate that into this Scriptmaster script. There's a line in the Send Email script that lists the port at -1 during the transport section of the script. A comment says to leave the port to the default value, but I'm not sure if that means the default value in the script or the default value for the server. In any case, I've tried changing that value to to SSL or TLS port numbers with no success. Other javamail scripts I've run across seem to set the port number at the same point in time when the other properties are being set. I don't want to use a desktop client, this script is to be used to send bulk emails and I don't want another application to open on the user's computer and have to have it be open for the whole while that emails are being sent out. If I can't get this to work I'm thinking of just getting a copy of SMTPit.
April 26, 201015 yr I added the line below the other property settings: Properties props = new Properties(); props.setProperty("mail.smtp.host", smtpHost); props.setProperty("mail.smtp.auth", "true"); props.setProperty("mail.smtps.auth", "true"); props.put("mail.smtp.starttls.enable","true"); used smtp.gmail.com as the smtp server, and my full email address as my username. This worked for me. Have you tried it using these parameters? If you've modified the file you may want to download a fresh copy from our website to make sure that the only change is the one line at the end of the properties settings.
April 27, 201015 yr Author Hm, works. I'm not sure what happened, but using a fresh copy of Scriptmaster may have been the key. Thanks for the help!
Create an account or sign in to comment