0

I was wondering if there is a possibility to send automated emails from within open office calc. I want to achieve something like this:

IF(C5=TRUE;sendMail();doNothing())

Any ideas on how to implement this? Thanks so far

2
  • When exactly the mail should be sent? With every re-calculation of the sheet? Or only if the user manually executes the macro?
    – tohuwawohu
    Aug 7, 2014 at 14:38
  • Well, this is a tricky question. I was thinking of it by myself. Actually the mail should be sent with every recalculation but only once, when the cellvalue remains true (I think an invisible cell with an "alreadySent-Flag" would do the job). Also a message dialog asking the user to confirm, whether he wants to send the mail or not. Aug 7, 2014 at 14:58

1 Answer 1

0

The most straightforward way may be to use an external mail user agent (MUA) for sending the mail, calling it using the Shell() command - of course, this works only with a MUA that allows such mail dispatching via its command line. This way, your code if and when to trigger the mail dispatch will be located in your OOo macro code, and the actual mail dispatching is done by an external application. Which MUA to use depends on the target environment - so it might be error-prone if your macro is executed in an unexpected environment...

1
  • Thanks, that was also one of my thoughts. I am using Mozilla Thunderbird as a Mail Agent... Aug 8, 2014 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.