Skip to content
This repository has been archived by the owner on Nov 30, 2017. It is now read-only.

Proposal #3: Send Mail Action

simboss edited this page Nov 8, 2012 · 2 revisions

Adding a new SendMail Action

In several cases a geobatch flow could need to send an email with process results or a status report.

This feature, for example, might be useful for each case in which an important process fails and the administrator should be informed.

So in geobatch we have the possibility to define a specific action in order to send emails, if needed. In this cases we can make the mail configuration inside the flow configuration. Something like the following:

   <SendMailConfiguration>
      <serviceID>SendMailGeneratorService</serviceID>
      <id>SendMailGeneratorService</id>
      <description>SendMail action</description>
      <name>SendMailConfiguration</name>
 		
      <mailSubject>Mail subject</mailSubject>
		
      <mailSmtpHost>smtp.gmail.com</mailSmtpHost>
      <mailSmtpStarttlsEnable>true</mailSmtpStarttlsEnable>   
      <mailSmtpAuth>true</mailSmtpAuth>                       
      <mailSmtpPort>587</mailSmtpPort>                        
		
      <mailAuthUsername>[email protected]</mailAuthUsername> 
      <mailAuthPassword>xxxxxxxx</mailAuthPassword>               
		
      <mailToAddress>[email protected]</mailToAddress>
      <mailFromAddress>[email protected]</mailFromAddress>
		
      <mailMessageText>Message text</mailMessageText>			
   </SendMailConfiguration>

An useful feature can be that the previous action writes the mail text on a file directly inside his temporal directory, then adds an event to the queue for the next action (SendMailAction).