Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

peterbaby

macrumors member
Original poster
Jan 29, 2008
55
0
Hi all,

I'm quite comfortable with AppleScript, but never used Dashcode programming. I'd like a simple widget that can send an email (always the same - this is for a home automation system) when clicking on a button.

In dashcode, I've got my widget set up; my button is there with the event handler...the only question remaining is which code to insert there :D

Code:
function SendOrder(event)
{
    // Insérer le code ici
}

Basically, the destination e-mail , subject and email content will always be the same, so I can hard code everything.
The mail can be sent using the easiest method:
- Hard coding my email account in the widget
- Simply telling Mail to send the email using my default account (this one would probably be simpler).

Sorry to be such a newbie, but the examples I have found never cover the sending email question.

Any advise, code sample or link to related help will be welcome!
Thanks a lot!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.