we have an issue with "Configuring Custom Email Senders". When we firs

we have an issue with "Configuring Custom Email Senders". When we first implemented that functionality,wWe followed the instruction on Appian 6.2 ,and migrate those conf files till now on Appian 7.0.
We have the same integration on all environments (DEV,UAT,PROD) the only difference is the mail address on each server.
For example on DEV it is bpmsdev@company.com and on PROD it is bpms prod@company.com.
And the issue is , when on some process instance "sent mail " is executing from PROD , actually it is like sending from DEV or UAT.
How it is possible and does anybody faced the same situation and how it was solved?
Thanks in advance,Natasa...

OriginalPostID-114232

OriginalPostID-114232

  Discussion posts and replies are publicly visible

  • The problem is that your custom sender is not following the best practice of using expressions:

    <address name="customUser">
    <expression>=toemailaddress(user(cons!CUSTOM_USER, "email"))</expression>
    </address>

    if you do not use an expression and hard-code an email address then when the model gets published that address is hardcoded in the model meaning that if you export the model and import it then the hardcoded email address will be preserved, that's why you see that when your models on DEV get promoted to PROD they still send emails with the DEV's address.

    Use constants and expressions instead as shown in the example above. There's a full example here too (at the bottom in the section called Expression Email Address) forum.appian.com/.../Configuring_Custom_Email_Senders
  • Once you fix this you can use the "Update Custom Sender" smart service from the Process Model Utilities plug-in to make your models pick up the new expression

    forum.appian.com/.../summary
  • So as I understand I need to define a constant where I will save an user from which e-mail adress i wil sent those system mails.Than I will need to redefine the conf. file like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <emailConfig>
    - <addresses>
    - <address name="process">
    - <!-- This name is a key which needs to be specified in the collection to which it belongs
    -->
    <expression>=getProcessEmail(pp!id)</expression>
    - <!-- Either emailAddress or expression
    -->
    </address>
    - <address name="processModel">
    <expression>=getProcessModelEmail(pm!id)</expression>
    </address>
    - <address name="processInitiator">
    <expression>=toemailaddress(user(pp!initiator,"email"))</expression>
    </address>
    - <address name="processDesigner">
    <expression>=toemailaddress(user(pp!designer,"email"))</expression>
    </address>
    address name="Appian BPMS">
    <expression>=toemailaddress(user(cons!CUSTOM_USER, "email"))</expression>
    </address>
    </addresses>
    - <collections>
    - <collection name="from">
    - <items>
    <item>AppianBPMS</item>
    <item>process</item>
    <item>processModel</item>
    <item>processInitiator</item>
    <item>processDesigner</item>
    </items>
    </collection>
    And after restarting server,we need to do save and publish on each process model where we use Sent Mail smart service.
    Right or it will be implemented automatically?
    The links that you are sharing with me are for Appian 7.5 but there compatible with Appian 7.0?
    What about when we do next modification on any application and export import it on PROD is there anything that we need to do?
  • 1. Create a constant of type: "Email Address" and call it, let's say

    cons!APPIAN_BPMS_CUSTOM_SNDR_ADDR

    2. Deploy the attached XML replacing yours

    3. Restart JBoss

    4. Export the constant to all your environments

    5. Edit the value of the constant accordingly for each environment to point to the right email address

    6. On DEV open each process model and RE-SELECT the custom sender. Save and publish (or use the plug-in I mentioned above)

    7. You can now EXPORT this model and as long as the constant has the right value on each environment this will send emails on behalf of the right email address

    *** NOTE: Notice how once you update the value of the constant you shouldn't be importing it again in the environments since that will mean you are overriding the value again.

    *** NOTE #2: Yes, those links apply to 7.0

    email-address-config-custom.xml

  • Hi Eduardo, I did what you told me but on the newest 7.8 version but still the presented from mail is like from other environment.Also I must ask how this is going to reflected on already active instance.
    Am sharing you the both conf files.
    BR,Natasa

    email-address-config-custom.xml

    email-address-config-custom_en_GB.properties

  • Based on your configuration files your Send Email node should now send the emails from whatever email address you have in "=cons!APPIAN_BPMS_CUSTOM_SNDR_ADDR" for NEW PROCESS INSTANCES if you've performed step #6 (which I describe in more detail below):

    6. Open each process model and select OTHER SENDER then save and publish. After that RE-SELECT the custom sender. Save and publish (or use the plug-in I mentioned above). This will update the model for new instances.


    Existing instances will use their original value.