AnsweredAssumed Answered

Sending email with different address

Question asked by theoryoflinkin on Jun 20, 2014
Latest reply on Jun 23, 2014 by theoryoflinkin
Hi everyone,

For the moment, in my workflow, I have an email task that sends emails to a specific address.

But my problem is that this uses always the same address to send the mail.

What I need is to send the email with the address of the workflow initiator.

I can get this address but it always sends the email with the default address.

For example:

var mail = actions.create("mail");
mail.parameters.subject = "";
mail.parameters.from = execution.getVariable('util_mailInitiator');
mail.parameters.to = execution.getVariable('util_mailRequester');
mail.parameters.text = "…";
mail.execute(bpm_package);

This will send email with the default email in my SMTP configuration (mail.username) as "from" parameters. And it will not use the "execution.getVariable('util_mailInitiator')"

My SMTP configuration:

mail.from.enabled=true
mail.from.default=cgt@alfresco.org
mail.host=smtp.live.com
mail.port=587
mail.username=****@wavenet.be
mail.password=****
mail.protocol=smtp
mail.smtp.starttls.enable=true
mail.smtp.auth=true
mail.encoding=UTF-8


Is there a way to change this?

Hope this clear

Thanks in advance

Outcomes