I've kind of got it working but I can't seem to only send the image if the user clicks ok to the dialog box option:
Code:
//Email Function
Dialogs.msgBox("Capture saved!", "Capture Screen", 0 | 48);
if (Dialogs.msgBox("Would you like to email your image?", "Capture Screen", 4 | 32) != 1)
{
Dialogs.msgBox("Please wait while we send your image. This process may take up to 60 seconds", "Capture Screen", 64);
var mail = new Mail;
//make the envelope
mail.from = "*********";
mail.replyTo = "***********";
mail.to = "*********";
mail.subject = "**********";
mail.date = Date();
mail.priority = 3;
mail.addAttachment(path);
//send the mail
var sender = new SendMail;
sender.server = "********";
//if need authorization, set username and password
sender.username = "********";
sender.password = "******";
sender.send(mail);
Dialogs.msgBox("Email sent!", "Capture Screen", 64);
return true;
}
else
{
}
Any ideas ?