View unanswered posts | View active topics It is currently Wed Jun 19, 2013 8:51 am



Reply to topic  [ 20 posts ]  Go to page: 1, 2  Next
 Authenticated Mail 
Author Message
Post Authenticated Mail
from the help file:
Indigo also does not currently support connecting to SMTP servers that require authentication. Most personal ISP's do not require SMTP authentication, so we recommend that you use your ISP mail server settings.


My ISP does require authentication... any plans to support it soon?


Mon May 19, 2003 9:38 pm
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11814
Location: Texas
Post Re: Authenticated Mail
Jeff wrote:My ISP does require authentication... any plans to support it soon?

Bummer. Let me investigate what will be involved in adding this. In the mean time, you could use a simple AppleScript to have the OS X Mail program send the mail for you. Something like this should work:

tell application "Mail"
  set bodyvar to "body of message"
  set addrVar to "username@not_a_valid_email_address.com"
  set subjectvar to "Test Message"

  set newMessage to (a reference to (make new outgoing message))
  tell newMessage
    make new to recipient at beginning of to recipients with properties {address:addrVar}
    set the subject to subjectvar
    set the content to bodyvar
  end tell

  send newMessage
end tell

If this will work for you, then I can show you how to create an AppleScript attachment for Indigo that defines the above functionality as a handler, say SendEmail(). Then, from within Indigo you could just select the AppleScript action type and type in something like, "SendEmail("persons_email_address", "subject", "body").

regards,
matt


Mon May 19, 2003 10:06 pm
Profile WWW

Joined: May 20, 2003
Posts: 1
Post mail script
Thanks! That will work fine for me and can be easily adapted to the few items I currently wish to use email for (power failure and startup notification).

I guess the next things I would like to use email for would be things like sending an email and getting back an email showing current status of all devices, or maybe having the most recent event log emailed to me?

Jeff


Tue May 20, 2003 10:27 am
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11814
Location: Texas
Post Re: mail script
neonmarg wrote:I guess the next things I would like to use email for would be things like sending an email and getting back an email showing current status of all devices, or maybe having the most recent event log emailed to me?

Using AppleScript you could build up the status of all devices as the body of the email script above. For an example of how to get the status of all the devices, take a look at the sample script shipped with Indigo, "example - list devices.scp". It is located in your user/Documents/Indigo User Date/scripts/ folder.

Emailing the most recent log file, although possible, won't be as simple. It would be easier if I added an AppleScript object that pointed to the currently active log file. I'll see what is involved in adding this.

regards,
matt


Tue May 20, 2003 7:53 pm
Profile WWW

Joined: May 17, 2003
Posts: 6
Post Re: mail script
Maybe slightly off topic, but does the application write to the house file upon each status change? I'm looking at having Apache/PHP parse the XML for a web based report. I realize too that I can probably answer this for myself, but was wanting to get the idea out for discussion.

/zim


Wed May 21, 2003 9:02 pm
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11814
Location: Texas
Post Re: mail script
W1BMW wrote:Maybe slightly off topic, but does the application write to the house file upon each status change? I'm looking at having Apache/PHP parse the XML for a web based report. I realize too that I can probably answer this for myself, but was wanting to get the idea out for discussion.

The database file is not automatically saved after device state changes.

The database is saved every 15 minutes after a user (non-state) change to a device/trigger/group setting. The idea being to auto-save every 15 minutes after an important configuration or control logic change, but not to try to auto-save just because a light was turned on.

The entire database (including states) are saved upon application quit.

I'd probably recommend that you write an AppleScript attachment for the following handlers: receive x10 event, receive av event, receive security event. Write a handler that overrides these functions to first call the Indigo handler (via the AppleScript "continue" command), and then enumerate through the devices to pull out the current state.

regards,
matt


Wed May 21, 2003 9:39 pm
Profile WWW
Post Follow-up question to the authentification question
Matt,

I love the software so far. one simple question though: I'm trying to use Mail to send notices back when I'm not at home, but my provider requires authentification for outgoing messages. Am I missing something, or is there still no support for this in the current build?

I compiled the AppleScript you mentioned above and ran it with no problems; how would I run it with Indigo?

(OS 10.2.8, 333mhz iMac)


Sat Feb 28, 2004 10:08 am
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11814
Location: Texas
Post Re: Follow-up question to the authentification question
Correct, there still is no support for authenticated SMTP servers.

Use an "Execute Applescript" Action type (last panel of either a Trigger or Time/Date Action). You can either point to the file you already created, or you can copy & paste the script source into the edit field and choose the Embedded radio button.

Regards,
Matt


Sat Feb 28, 2004 10:42 am
Profile WWW

Joined: Apr 01, 2003
Posts: 823
Location: Rio Rancho, NM
Post 
Based on your script I tried the following attachement:

--[url=applescript://com.apple.scripteditor/?action=new&script=using%20terms%20from%20application%20%22Indigo%22%0A%09on%20Send_Email(bodyvar,%20addrVar,%20subjectvar)%0A%09%09try%0A%09%09%09tell%20application%20%22Mail%22%0A%09%09%09%09set%20newMessage%20to%20(a%20reference%20to%20(make%20new%20outgoing%20message))%0A%09%09%09%09tell%20newMessage%0A%09%09%09%09%09make%20new%20to%20recipient%20at%20beginning%20of%20to%20recipients%20with%20properties%20%7Baddress%3AaddrVar%7D%0A%09%09%09%09%09set%20the%20subject%20to%20subjectvar%0A%09%09%09%09%09set%20the%20content%20to%20bodyvar%0A%09%09%09%09end%20tell%0A%09%09%09%09%0A%09%09%09%09send%20newMessage%0A%09%09%09end%20tell%0A%09%09end%20try%0A%09end%20Send_Email%0Aend%20using%20terms%20from%0A]Click here to open this script in a new Script Editor window[/url].

using terms from application "Indigo"
     on Send_Email(bodyvar, addrVar, subjectvar)
          try
               tell application "Mail"
                    set newMessage to (a reference to (make new outgoing message))
                    tell newMessage
                         make new to recipient at beginning of to recipients with properties {address:addrVar}
                         set the subject to subjectvar
                         set the content to bodyvar
                    end tell
                    
                    send newMessage
               end tell
          end try
     end Send_Email
end using terms from


But Indigo gives errors. What do I need to change?

edit: Works fine, I left out a quote in my test message. the test message.

_________________
Greg In The Desert


Sat Feb 28, 2004 1:40 pm
Profile WWW

Joined: Jul 17, 2004
Posts: 3
Post question about power restore
This thread has been very helpful - have email all set up for a power failure. Does anyone know how to trigger an email when poer is restored? The log produces a message:

Power Failure interface power back online

But, I could not find a variable to use to trigger an email.

thanks

_________________
roba


Sat Jul 17, 2004 11:08 am
Profile

Joined: Apr 01, 2003
Posts: 823
Location: Rio Rancho, NM
Post Re: question about power restore
roba wrote:Does anyone know how to trigger an email when poer is restored?


Indigo only has a trigger for a power failure not a power restored. I made that feature request in some other thread somewhere for this capability. I'm sure Matt is overwhelmed with my FRs by now :oops:

_________________
Greg In The Desert


Sat Jul 17, 2004 11:28 am
Profile WWW
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11814
Location: Texas
Post Re: question about power restore
There is not currently a way to define a trigger for this, but this has been requested and is something I will look into.

Regards,
Mat


Sat Jul 17, 2004 11:46 am
Profile WWW

Joined: Jul 16, 2004
Posts: 205
Location: Ontario, Canada
Post My ISP also requires authentication
I have tried Greg's script but although I get a message in the Event log that the Trigger Action has occurred, the script does not appear to get invoked. Nothing else appears in the log. I'm far from an AppleScript expert ... but if there is a simple way to troubleshoot the script I would appreciate it. I have tried it both embedded and as a file without any difference.

_________________
Patricia


Mon Jul 19, 2004 11:40 am
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11814
Location: Texas
Post Re: My ISP also requires authentication
Try putting lines like this throughout the script:

tell app "Indigo" to log "got this far1"

changing the "far1" to "far2", "far3", etc., for each new line you add. Now you will be able to tell how far into the script you have gotten. You can also copy and pase the entire script into the Script Editor and manually run it there. Remove the "on Send_Email" line (and the end Send_Email line), and replace it with these lines:

set addrVar to "email_address@something.com"
set bodybar to "test body of the email"
set subjectvar to "test subject"

Regards,
Matt


Mon Jul 19, 2004 12:16 pm
Profile WWW

Joined: Jul 16, 2004
Posts: 205
Location: Ontario, Canada
Post My ISP also requires authentication
Thanks Matt,

I was able to get it working with your assistance. Part of my problem was in identifying that I had to invoke the script with Send_Email and not use the name of the script (which I had named sendmail.) See how basic my knowledge is. The "on Send_Email" command was failing.

_________________
Patricia


Mon Jul 19, 2004 6:45 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 20 posts ]  Go to page: 1, 2  Next

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.   Template designed by STSoftware.