Sending email with different address
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2014 03:15 AM
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:
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:
Is there a way to change this?
Hope this clear
Thanks in advance
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=truemail.from.default=cgt@alfresco.orgmail.host=smtp.live.commail.port=587mail.username=****@wavenet.bemail.password=****mail.protocol=smtpmail.smtp.starttls.enable=truemail.smtp.auth=truemail.encoding=UTF-8
Is there a way to change this?
Hope this clear
Thanks in advance
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2014 11:22 AM
It should work. Sorry I can't see an error in what you have posted.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2014 02:33 AM
Hi,
Thank you for this answer.
In fact, you're right.
I have a custom class for sending mail with attachment. And when I try to send mail with default alfresco bean, it works.
So the problem is in my custom class…
Thank you for the help
Thank you for this answer.
In fact, you're right.
I have a custom class for sending mail with attachment. And when I try to send mail with default alfresco bean, it works.
So the problem is in my custom class…
Thank you for the help
