OGame Automizer Development Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome on the OGame Automizer Development/Support Forum

If this is your first visit, be sure to check out the
http://ogameautomizer.com/doc/manual.html : A guide written by OA users with consultation of OA author (En)

http://ogameautomizer.com/doc/manual_de.html : A guide written by OA users with consultation of OA author (Benutzerschnittstellenhandbuch) (GE)

http://ogameautomizer.com/doc/scripting_manual.html : OA Scripting Manual (En)

Pages: 1 [2] 3 4 ... 8

Author Topic: Send E-Mail if Player send you a Message * UPDATE 3.0 * 18-7-2012  (Read 29479 times)

0 Members and 1 Guest are viewing this topic.

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #15 on: June 09, 2012, 03:21:00 PM »

Code: [Select]
def dirPath = "C:\\OGameAutomizerRD\\Messages\\uniXXX.ogame.XX"
def dirBckUp = "C:\\OAMsgBackup\\UNI_XXX"

should be replaced by:
Code: [Select]
def dirPath = System.getProperty("user.dir")+File.separatorChar+"Messages"+File.separatorChar+getOGameAddress()
new File(System.getProperty("user.dir")+File.separatorChar+"BackupedMessages").mkdir()
new File(System.getProperty("user.dir")+File.separatorChar+"BackupedMessages"+File.separatorChar+getOGameAddress()).mkdir()
def dirBckUp = System.getProperty("user.dir")+File.separatorChar+"BackupedMessages"+File.separatorChar+getOGameAddress()


Perfect. Works like a charm! Thanks DH :)
Logged

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #16 on: June 09, 2012, 05:26:33 PM »

i have always this :

Script uni****.ogame.*** ------- has been stopped, Throwable: No match available

Maybe u should try reinstall the script and replace relevant area with dh's new code to see if that works.
Logged

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #17 on: June 09, 2012, 06:03:47 PM »

The script doesnt seem to be either extracting or relaying the content of the messages out to the email. I get a notification with an email but its content maketext 0-4 isnt being output to the email.
Logged

chronos001

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 71
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #18 on: June 09, 2012, 08:59:25 PM »

@asdasd: I have the same problem in another UNI, there is an error in the parsin procedure for one message, you can try to go on the messages\UNI folder and cut all messages and past in a temp directory, the start script and do a test with one of your friend in game. for me work...
Yes, DH send me a suggestion for correct the script, but i'm not at work in WE and I can not correct now... :(
Sorry for the many error, but I don't known Groovy very well... I'm studying it as I write scripts... ::)
The script need correction, optimized and test good... and I can not do it in 4 hour last friday  :( ...
For the mail Zebra have right, the variable are not parsed and the SendMail function not work if don't write directly String and Int Port....
.... Is a BETA.... mmm I think is ALPHA heheheheh.... but thanks to all for test and suggestions..... ;D
Logged

chronos001

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 71
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #19 on: June 09, 2012, 09:03:27 PM »

@Zebra: In wich language you play? ... I need to check HTML code in your language.

When I recive mail, the text is:

Details of Message:
From: XXXXXX
To: YYYYYYY
Date: 09.06.2012 01:58:42
Object: a sempre tu sei? ;)
Text: non mi ero accorto che eri sempre tu :)

What you recive?
Logged

asdasd

  • Full Member
  • ***
  • Offline Offline
  • Posts: 231
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #20 on: June 10, 2012, 12:47:27 AM »

@chronos it's true script must start first time without messages!

@devil this script can connect with send sms with calendar and no with email? is it possible?
Logged

Devil's Hand

  • Administrator
  • Hero Member
  • *****
  • Offline Offline
  • Posts: 2,523
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #21 on: June 10, 2012, 01:24:34 AM »

Quote
@devil this script can connect with send sms with calendar and no with email? is it possible?
make an API request.

Regards,
Logged

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #22 on: June 10, 2012, 04:12:34 AM »

@Zebra: In wich language you play? ... I need to check HTML code in your language.
Details of Message:
From: XXXXXX
To: YYYYYYY
Date: 09.06.2012 01:58:42
Object: a sempre tu sei? ;)
Text: non mi ero accorto che eri sempre tu :)

What you recive?


Details of Message:
From: xxxx
To: xxxx
Date: 08.06.2012 06:16:52
null
null

Update: Got it working.

Problem were:

Have to change 'Object:' to 'Subject:'

and uncomment 'note'.
« Last Edit: June 10, 2012, 04:41:22 AM by Zebra »
Logged

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #23 on: June 10, 2012, 04:31:05 AM »

.... mmm I think is ALPHA heheheheh.... but thanks to all for test and suggestions..... ;D
Well.. for the many quirks it has now, it still serves my purpose well because all i need it to do really is to send me a notification when someone messages me and it does :) So Kudos for that  ;D
Logged

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #24 on: June 10, 2012, 05:56:01 AM »

DH,

Is there anyway for this script to force update the messages update? The script reads from the messages folder every 5-10 mins but the messages folder seems to be updating slower. Maybe the script needs to ask OA to update the messages folder before running.
Logged

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #25 on: June 10, 2012, 06:31:08 AM »

Below is the code that works perfectly now with OSX using GMAIL and Ogame in English. Should NOW work as well for other OSes.
You will need to change the lines in blue below to your own settings in the code.
The areas you will need to configure are marked by:

//-------------- CONFIGURATION BY USER -----------------------------------------------

//-------------- END CONFIGURATION BY USER-------------------------------------------
   
"Recipient_email_xxx@gmail.com"                    > The email that receives the notifications
"Relay_Email_Password_xxxxx"              > The password of email that sends the notifications
"Relay_Email_Sender_xxxx@Gmail.com"    > The email that sends the notifications

For Ogame in other languages:

Open up a player message in your messages folder. Look for the codes <th scope="row"> using the find word in your editor and where the definition below correspond:

def htmlTo = "To:"  > change the "To:" to your the word your ogame language uses
def htmlDate = "Date:" > change the "Date:" to your the word your ogame language uses
def htmlObject = "Subject:" > change the "Subject:" to your the word your ogame language uses
def htmlText = "note" > change the "Note:" to your the word your ogame language uses. However, English and Italian uses 'note' so other languages maybe using the same. Change you are getting a null in your messages.

The codes above is the correct ones for english.
For Italian its "A:", "Data:" and "Oggetto:" etc

Code: [Select]

pauseScriptWhenOADisabled()

// ------ SCRIPT BY CHRONOS001 ---------------------------------------------------------

//------- PARAMETER OF HTML TAG ------------------------------------------------------
// For correct use of this script you need to open an HTML File stored in in "Your_OA_Folder\Messages" with an HTML Editor or similar and search for correct TAG in your language
// Ex. for Object Parse you need to search a string like <th scope="row">Object:</th> and write the word Object: in htmlObject def
// IN ALERNATIVE YOU CAN TRY TO SIMPLE OPEN THE HTM FILE AND READ THE CORRECT WORDS IN TOP OF THE PAGE OPENED LIKE THIS:
//From: Comando della Flotta -----> Insert word:  "From:"
//To: xxxxxxx -----> Insert word:  "To:"
//Object: Rapporto di Combattimento [xxxxx] (D: 0, A: 0)  -----> Insert word:  "Object:"
//Date: 02.06.2012 10:54:18  -----> Insert word:  "Date:"

//-------------- CONFIGURATION BY USER -----------------------------------------------

// THIS IS FOR ITALIAN LANGUAGE -> Disable if ENG ENABLED

//def htmlTo = "A:"
//def htmlDate = "Data:"
//def htmlObject = "Oggetto:"

// TRY ENABLE THIS FOR ENGLISH or Uncomment // if using OTHER LANGUAGE DECLARATION BELOW

def htmlTo = "To:"
def htmlDate = "Date:"
def htmlObject = "Subject:"
// def htmlText = "note" // For the message. Not necessary to change

// OTHER LANGUAGE DECLARATIONS.Uncomment and change the "variables:" to your own language as defined by your messages html
//  <th scope="row">To:</th>
//  <th scope="row">Subject:</th>
//  <th scope="row">Date:</th>

// def htmlTo = "To:"
// def htmlDate = "Date:"
// def htmlObject = "Subject:"
// def htmlText = "note"

//------- PARAMETER OF YOUR EMAIL -----------------------------------

def mailFrom = "Relay_Email_Sender_xxxx@Gmail.com"          // Gmail that sends message
def mailTo = "Recipient_email_xxx@gmail.com"                    // Gmail that receives message
def mailUserName = "Relay_Email_Sender_xxxx@Gmail.com" // Gmail that sends message
def mailPassword = "Relay_Email_Password_xxxxx"              // Password for gmail that sends message
def mailSmtp = "smtp.gmail.com"                                // Change only if smtp not Gmail
def smtpPort = 465 // Default is 25, but ex. for gmail is 465. Do not change if using Gmail.
def enableSSL = true // true if your provider use SSL, like GMail else insert false. - set true for Gmail.

//------- OTHER SETUP ---- TIMING INTERVAL TO CHECK FOR NEW MESSAGE  -----------------

def interval = 5 // In Min --> Time thet Script check for new Messages

// I suggest a time between 5 and 10 minute for not usage too many cpu

//------- END CONFIGURATION BY USER -------NOTHING BELOW IS USER CONFIGURABLE---------

//------- PARAMETER OF FILE POSITION -------------------------------------------------

// Automatically defined by code below by Devil's Hand

def dirPath = System.getProperty("user.dir")+File.separatorChar+"Messages"+File.separatorChar+getOGameAddress()
new File(System.getProperty("user.dir")+File.separatorChar+"BackupedMessages").mkdir()
new File(System.getProperty("user.dir")+File.separatorChar+"BackupedMessages"+File.separatorChar+getOGameAddress()).mkdir()
def dirBckUp = System.getProperty("user.dir")+File.separatorChar+"BackupedMessages"+File.separatorChar+getOGameAddress()

//------- PARAMETER OF FILE POSITION END ----------------------------------------------

//------- DEFINE and PARSE ARRAYS START -------------------------------------------------

def sTo = "<th scope=\"row\">" + htmlTo + "</th>"
def sDate = "<th scope=\"row\">" + htmlDate + "</th>"
def sObject = "<th scope=\"row\">" + htmlObject + "</th>"
def sText = "<div class=\"" + htmlText + "\">"
def sFrom = '<span class="playerName">'
def FileLineRead = []
def makeText = []

def isRead = new int[5] // from, to, date, object, text

def setArrayReader = { chkLine ->
    isRead[0] = 0
    isRead[1] = 0
    isRead[2] = 0
    isRead[3] = 0
    isRead[4] = 0

  if (chkLine.contains(sFrom)){
    isRead[0] = 2
    isRead[1] = 0
    isRead[2] = 0
    isRead[3] = 0
    isRead[4] = 0
  }
  if (chkLine.contains(sTo)){
    isRead[0] = 0
    isRead[1] = 2
    isRead[2] = 0
    isRead[3] = 0
    isRead[4] = 0
  }
  if (chkLine.contains(sDate)){
    isRead[0] = 0
    isRead[1] = 0
    isRead[2] = 2
    isRead[3] = 0
    isRead[4] = 0
  }
  if (chkLine.contains(sObject)){
    isRead[0] = 0
    isRead[1] = 0
    isRead[2] = 0
    isRead[3] = 2
    isRead[4] = 0
  }
  if (chkLine.contains(sText)){
    isRead[0] = 0
    isRead[1] = 0
    isRead[2] = 0
    isRead[3] = 0
    isRead[4] = 2
  }
}

def setOutString = { stringToParse, intFrom, intTo ->
  return stringToParse.subSequence(intFrom,intTo)
}

def isPlayer = { textLine ->
    return textLine.contains(":")
}
//------- DEFINE and PARSE ARRAYS END -------------------------------------------------

//-------------- MAIN ------------------

def i = 0
while (true){
printOut "Checking for new Player Messages..."
new File(dirPath).eachFile() { sFile ->
  i = 0
  sFile.eachLine{ line ->
    FileLineRead[i] = line
    i++
  }

  setArrayReader("")
  for (k in 0..i-1){   
    readStr = FileLineRead[k].trim()
    if (isRead[0] != 0){
      if (isPlayer(readStr)) {
        s = ~'<'
        m = s.matcher(readStr)
        m.find()
        makeText[0] = "From: " + setOutString(readStr,0,m.start()-1)
      }else{
        makeText[0] = "NOMAIL"       
        break
      }
    }

  if (isRead[1] != 0){makeText[1] = "To: " + setOutString(readStr,4,readStr.size()-5)}
  if (isRead[2] != 0){makeText[2] = "Date: " + setOutString(readStr,4,readStr.size()-5)}
  if (isRead[3] != 0){makeText[3] = "Subject: " + setOutString(readStr,4,readStr.size()-5)}
  if (isRead[4] != 0){
    s = ~'<br />'
    m = s.matcher(readStr)
    m.find()
    readStr = setOutString(readStr,17,m.start()).trim()
    makeText[4] = "Text: " + readStr.subSequence(0,readStr.size()-4)
  }
    setArrayReader(readStr)
}

  if (makeText[0] != "NOMAIL"){
    printOut "Send Mail"
   
// ------------ START MAIL SUBROUTINE ------------------------------

sendEmail(
mailTo , mailFrom, 

// Change "text in green" if you want to customize your messages. Do not change "\n" (new line)

"Message Waiting", // Subject:
"Details of Message: \n" + makeText[0] + "\n" + makeText[1] + "\n" + makeText[2] + "\n" + makeText[3] + "\n" + makeText[4],          //core message

// --------------DO NOT CHANGE BELOW ----------------------------

mailSmtp, smtpPort,  mailUserName, mailPassword,  enableSSL 
)
// ------------ END MAIL SUBROUTINE --------------------------------

    File srcFile = new File(dirPath + File.separatorChar + sFile.getName())
    File destFile = new File(dirBckUp + File.separatorChar + sFile.getName())
   
destFile.withDataOutputStream { os-> 
      srcFile.withDataInputStream { is-> 
         os << is 
      } 
    }
    srcFile.delete()
  }
}
sleep (interval*1000*60)
}

Let me know if it works for windows users.

Update: There is an issue with the declaration that is causing mismatch. Certain messages are ok whilst others will cause 'no match'. Ive commented out this for the time being until it can be resolved. You will be able to receive notification of messages but the emails will not contain the message itself. Only From/To/Subject.

Problem is def htmlText = "note". The reference is to the message html:

<div class="note">
            <p class="other">blah blah blah</p>            <br />
</div>

The script seems unable to parse this. DH, Can you recommend a solution?

Update: Seems like if the message content is short, it works. If the message content is long, it gives 'No Match Available'. Not enough memory allocated to the array?
« Last Edit: June 10, 2012, 12:10:36 PM by Zebra »
Logged

chronos001

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 71
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #26 on: June 11, 2012, 09:11:22 AM »

For declaration of EMail parameter this is a good way:

Code: [Select]
def String mailFrom = "xxxxxxxxxx"
def String mailTo = "xxxxxxxxxxxx"
def String mailUserName = "xxxxxxxxxxxxx"
def String mailPassword = "xxxxxxxxxxxx"
def String mailSmtp = "smtp.gmail.com"
def int smtpPort = 465 // Default is 25, but ex. for gmail is 465
def boolean enableSSL = true // true if your provider use SSL, like GMail else insert false

Quote
Update: There is an issue with the declaration that is causing mismatch. Certain messages are ok whilst others will cause 'no match'. Ive commented out this for the time being until it can be resolved. You will be able to receive notification of messages but the emails will not contain the message itself. Only From/To/Subject.

Problem is def htmlText = "note". The reference is to the message html:

<div class="note">
            <p class="other">blah blah blah</p>            <br />
</div>

For this problem, now I insert double check parse, for "note" and for "other", no problem  ;D

Quote
Update: Seems like if the message content is short, it works. If the message content is long, it gives 'No Match Available'. Not enough memory allocated to the array?

I think is a limitation of the String in the array, I check for it! ;)
Logged

chronos001

  • Jr. Member
  • **
  • Offline Offline
  • Posts: 71
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #27 on: June 11, 2012, 09:40:43 AM »

*** UPDATE TO BETA 2.0 ***

Bug Correction:
With many thanks to DH, Zebra and other user suggestions:
1. Correct "note" and "other" parsing, now it work with both definition, no more "Script uni****.ogame.*** ------- has been stopped, Throwable: No match available" (Thx to Zebra for the note)
2. Now OA AutoDetect and Messages directory and make Dir for Backup (Thx to DH)
3. Insert defined variable for send mail
4. Correct definition for parsing English Text (Thx to Zebra)

New:
1. Printout the Backup directory when script start
- Other Work in Progress  ;D


Code: [Select]
pauseScriptWhenOADisabled()

// ------ SCRIPT BY CHRONOS001 ---------------------------------------------------------

//------- PARAMETER OF HTML TAG ------------------------------------------------------
// For correct use of this script you need to open an HTML File stored in in "Your_OA_Folder\Messages" with an HTML Editor or similar and search for correct TAG in your language
// Ex. for Object Parse you need to search a string like <th scope="row">Object:</th> and write the word Object: in htmlObject def
// IN ALERNATIVE YOU CAN TRY TO SIMPLE OPEN THE HTM FILE AND READ THE CORRECT WORDS IN TOP OF THE PAGE OPENED LIKE THIS:
//From: Comando della Flotta -----> Insert word:  "From:"
//To: xxxxxxx -----> Insert word:  "To:"
//Object: Rapporto di Combattimento [xxxxx] (D: 0, A: 0)  -----> Insert word:  "Object:"
//Date: 02.06.2012 10:54:18  -----> Insert word:  "Date:"

//-------------- CONFIGURATION BY USER -----------------------------------------------

// THIS IS FOR ITALIAN LANGUAGE -> Disable if ENG ENABLED

//def htmlTo = "A:"
//def htmlDate = "Data:"
//def htmlObject = "Oggetto:"

// TRY ENABLE THIS FOR ENGLISH or Uncomment // if using OTHER LANGUAGE DECLARATION BELOW

def htmlTo = "To:"
def htmlDate = "Date:"
def htmlObject = "Subject:"

//------- PARAMETER OF YOUR EMAIL -----------------------------------

def String mailFrom = "Relay_Email_Sender_xxxx@Gmail.com"          // Gmail that sends message
def String mailTo = "Recipient_email_xxx@gmail.com"                    // Gmail that receives message
def String mailUserName = "Relay_Email_Sender_xxxx@Gmail.com" // Gmail that sends message
def String mailPassword = "Relay_Email_Password_xxxxx"              // Password for gmail that sends message
def String mailSmtp = "smtp.gmail.com"                                // Change only if smtp not Gmail
def int smtpPort = 465 // Default is 25, but ex. for gmail is 465. Do not change if using Gmail.
def boolean enableSSL = true // true if your provider use SSL, like GMail else insert false. - set true for Gmail.

//------- OTHER SETUP ---- TIMING INTERVAL TO CHECK FOR NEW MESSAGE  -----------------

def interval = 5 // In Min --> Time thet Script check for new Messages
// I suggest a time between 5 and 10 minute for not usage too many cpu

//------- END CONFIGURATION BY USER ------- NOTHING BELOW IS USER CONFIGURABLE---------

//------- PARAMETER OF FILE POSITION -------------------------------------------------

// Automatically defined by code below by Devil's Hand

def dirPath = System.getProperty("user.dir")+File.separatorChar+"Messages"+File.separatorChar+getOGameAddress()
new File(System.getProperty("user.dir")+File.separatorChar+"BackupedMessages").mkdir()
new File(System.getProperty("user.dir")+File.separatorChar+"BackupedMessages"+File.separatorChar+getOGameAddress()).mkdir()
def dirBckUp = System.getProperty("user.dir")+File.separatorChar+"BackupedMessages"+File.separatorChar+getOGameAddress()
printOut "Backup message are in: " + dirBckUp

//------- PARAMETER OF FILE POSITION END ----------------------------------------------

//------- DEFINE and PARSE ARRAYS START -------------------------------------------------

def htmlText = ["note","other"] // For the Text I think is not necessary to change
def sTo = "<th scope=\"row\">" + htmlTo + "</th>"
def sDate = "<th scope=\"row\">" + htmlDate + "</th>"
def sObject = "<th scope=\"row\">" + htmlObject + "</th>"
def sText = ["<div class=\"" + htmlText[0] + "\">","<div class=\"" + htmlText[1] + "\">"]
def sFrom = '<span class="playerName">'
def FileLineRead = []
def makeText = []

def isRead = new int[5] // from, to, date, object, text

def setArrayReader = { chkLine ->
    isRead[0] = 0
    isRead[1] = 0
    isRead[2] = 0
    isRead[3] = 0
    isRead[4] = 0

  if (chkLine.contains(sFrom)){
    isRead[0] = 2
    isRead[1] = 0
    isRead[2] = 0
    isRead[3] = 0
    isRead[4] = 0
  }
  if (chkLine.contains(sTo)){
    isRead[0] = 0
    isRead[1] = 2
    isRead[2] = 0
    isRead[3] = 0
    isRead[4] = 0
  }
  if (chkLine.contains(sDate)){
    isRead[0] = 0
    isRead[1] = 0
    isRead[2] = 2
    isRead[3] = 0
    isRead[4] = 0
  }
  if (chkLine.contains(sObject)){
    isRead[0] = 0
    isRead[1] = 0
    isRead[2] = 0
    isRead[3] = 2
    isRead[4] = 0
  }
  if (chkLine.contains(sText[0]) || chkLine.contains(sText[1])){
    isRead[0] = 0
    isRead[1] = 0
    isRead[2] = 0
    isRead[3] = 0
    isRead[4] = 2
  }
}

def setOutString = { stringToParse, intFrom, intTo ->
  return stringToParse.subSequence(intFrom,intTo)
}

def isPlayer = { textLine ->
    return textLine.contains(":")
}
//------- DEFINE and PARSE ARRAYS END -------------------------------------------------

//-------------- MAIN ------------------

def i = 0
while (true){
printOut "Checking for new Player Messages..."
new File(dirPath).eachFile() { sFile ->
  i = 0
  sFile.eachLine{ line ->
    FileLineRead[i] = line
    i++
  }

  setArrayReader("")
  for (k in 0..i-1){   
    readStr = FileLineRead[k].trim()
    if (isRead[0] != 0){
      if (isPlayer(readStr)) {
        s = ~'<'
        m = s.matcher(readStr)
        m.find()
        makeText[0] = "From: " + setOutString(readStr,0,m.start()-1)
      }else{
        makeText[0] = "NOMAIL"       
        break
      }
    }

  if (isRead[1] != 0){makeText[1] = "To: " + setOutString(readStr,4,readStr.size()-5)}
  if (isRead[2] != 0){makeText[2] = "Date: " + setOutString(readStr,4,readStr.size()-5)}
  if (isRead[3] != 0){makeText[3] = "Subject: " + setOutString(readStr,4,readStr.size()-5)}
  if (isRead[4] != 0){
    s = ~'<br />'
    m = s.matcher(readStr)
    m.find()
    readStr = setOutString(readStr,17,m.start()).trim()
    makeText[4] = "Text: " + readStr.subSequence(0,readStr.size()-4)
  }
    setArrayReader(readStr)
}

  if (makeText[0] != "NOMAIL"){
    printOut "Send Mail"
   
// ------------ START MAIL SUBROUTINE ------------------------------

sendEmail(
mailTo , mailFrom, 

// Change "text in green" if you want to customize your messages. Do not change "\n" (new line)

"Message Waiting", // Subject:
"Details of Message: \n" + makeText[0] + "\n" + makeText[1] + "\n" + makeText[2] + "\n" + makeText[3] + "\n" + makeText[4],          //core message

// --------------DO NOT CHANGE BELOW ----------------------------

mailSmtp, smtpPort,  mailUserName, mailPassword,  enableSSL 
)
// ------------ END MAIL SUBROUTINE --------------------------------

    File srcFile = new File(dirPath + File.separatorChar + sFile.getName())
    File destFile = new File(dirBckUp + File.separatorChar + sFile.getName())
   
destFile.withDataOutputStream { os-> 
      srcFile.withDataInputStream { is-> 
         os << is 
      } 
    }
    srcFile.delete()
  }
}
sleep (interval*1000*60)
}
Logged

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #28 on: June 11, 2012, 05:24:10 PM »

Nice. Works perfectly for me now.  8)
Logged

Zebra

  • Full Member
  • ***
  • Offline Offline
  • Posts: 212
    • View Profile
Re: Send E-Mail if Player send you a Message (BETA)
« Reply #29 on: June 11, 2012, 08:40:46 PM »

Still getting match problem.
Logged
Pages: 1 [2] 3 4 ... 8
 

Page created in 0.059 seconds with 20 queries.