Sending Email
Sending emails is a common way to notify users of special events. For instance, an API receives a create order request and the order requires the manager to approve it. The API can send an email notification with the order details as the message body to the manager. You can do this using ajSendEmail.
ajSendEmail(Host, Port, Sender_address, To_address, Cc_address, Bcc_address, Subject, Message, [Html_mail], [Attachment_path], [Run_condition],[Run_by_function_point_only])
The following worksheet shows an example of how to send an email in an AlchemyJ workbook.
The follow formula will be inputted in C19.
=ajSendEmail(C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14)
When the formula is recalculated, an email will be sent to the mailuser@alabmail.com as shown below.
The parameter RUN BY FUNCTION POINT ONLY prevents the function from being triggered whenever you modify the formula or when Excel recalculates the cell. When this parameter is TRUE, the function will get executed when you run a function point. If it is FALSE, the function would be triggered whenever the formula is recalculated.
For the details of this AlchemyJ Extended Function, you can refer to ajSendEmail .