You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2020.03.04 02:44:36.387279 T12: ID 3: WI 5: BasicsSendEmailToUser(4/0): System exception: /opt/share/qore-modules/0.9.4.1/SmtpClient.qm:851 (Qore): HASHDECL-IMPLICIT-CONSTRUCTION-ERROR: cannot implicitly create typed hash 'SmtpResponseInfo' with an assignment; to address this error, declare the typed hash before the assignment
*** RETHROW at /opt/share/qore-modules/0.9.4.1/SmtpClient.qm:522 (Qore)
SmtpClient::sendMessageInfoIntern() called at /opt/share/qore-modules/0.9.4.1/SmtpClient.qm:506 (Qore user code)
SmtpClient::sendMessage() called at BasicsSendEmailToUser:22 (Qore source "/opt/qorus/user/03_basics/01_exchange_rates_app/12_process_orders_workflow/qore/steps/BasicsSendEmailToUser-1.0.qstep":22 user code)
BasicsSendEmailToUser::primary() called at <builtin>:-1 (Qore user code)
call_object_method_args() called at Workflow.qc:222 (Qore builtin code)
Workflow::runStepPrimaryArgs() called at WorkflowExecutionInstance.qc:2748 (Qore user code)
WorkflowExecutionInstance::executeNormalStep() called at WorkflowExecutionInstance.qc:1565 (Qore user code)
WorkflowExecutionInstance::execStep() called at WorkflowExecutionInstance.qc:1670 (Qore user code)
WorkflowExecutionInstance::execStepThread() called at WorkflowExecutionInstance.qc:2028 (Qore user code)
WorkflowExecutionInstance::execSegment() called at WorkflowExecutionInstance.qc:2058 (Qore user code)
WorkflowExecutionInstance::execInitialSegment() called at WorkflowExecutionInstance.qc:1123 (Qore user code)
WorkflowExecutionInstance::exec() called at WorkflowExecutionInstance.qc:268 (Qore user code)
WorkflowExecutionInstance::startWorkflow() called at ClusterWorkflowExecutionInstance.qc:177 (Qore user code)
ClusterWorkflowExecutionInstance::startWorkflow() called at WorkflowExecutionInstance.qc:200 (Qore user code)
*** thread started by background operator ***
Step example:
%new-style
%strict-args
%require-types
%enable-all-warnings
%requires SmtpClient
%requires MailMessage
class BasicsSendEmailToUser inherits QorusNormalStep {
primary() {
list<hash<auto>> orders = getStaticData("orders");
SmtpClient smtp = getUserConnection("smtp-email");
foreach hash<auto> order in (orders) {
log(LL_DEBUG_1, "Sending email to %s", order.user_email);
MailMessage::Message message("test.qorus@gmail.com", "Order details");
string text = sprintf("You have received %d %s", order.amount, order.currency_to_buy);
message.setBody(text);
message.addTO(order.user_email);
smtp.sendMessage(message);
}
}
}
The text was updated successfully, but these errors were encountered:
Step example:
The text was updated successfully, but these errors were encountered: