Send emails with shell scripts

Hi,

I’m working on a piece of my script that sends an error message to me when an error encounters, so far I’ve got :

on error errmsg number errnum
		set question to display dialog "An error encounterd" buttons {"Cancel", "Send Error"} default button 2
		set answer to button returned of question
		if answer is equal to "Send Error" then
			open location "mailto:my%20%3Cemail%40address.com%3E?subject=Error"
		end if
end try

Isn’t there another way, without needing to open Mail ? and without needing to give your email address ? just sending it without the senders email address ?

Thanks

Hi,

take a look at Xmail.osax

But I can’t bundle it with my app right ?

Of course you can, an application package can also contain a folder /Contents/Resources/Scripting Additions.

While developing the app, the scripting addition must be available in the Scrpiting Additions folder /Library oder ~/Library

Oops, I didn’t know that, if I did, than developing my app would require approximately 500 lines less of script because I had to use work-arounds :confused: . Well thanks for letting me know :smiley:

Thanks