cancel
Showing results for 
Search instead for 
Did you mean: 

NotifcationUtil.sendNotification and email FROM address?

Former Member
0 Kudos

Hello Experts-

This *seems* so simple, but I can't get it to work... I want to be able to change the "FROM" email address based on purpose of the explicit script job using one of the Custom Mail templates, so the responses can go back to the correct people who need to handle them.

What is the purpose of sender on this IAPI call?  I thought it would change the "FROM" in the email address, but it doesn't seem to do anything...  The email sender remains as the system-wide email address.

     sendNotification(

      java.lang.String[] recipients,

      IapiAccountIfc sender,

      MailTypeEnum notificationType,

      java.util.Properties notificationParameters,

      java.lang.String attachmentDisplayName,

      java.io.InputStream attachment)

Other things I've tried:

1)

I experimented with the System Properties messaging.mail_source_policy settings thinking maybe it had to be set to DEFER_TO_MAILTYPE.  That didn't seem to work.  Unless I'm overlooking it, I haven't been able to find any documentation on what this does specifically...

2)

It does use a different one, if I set messaging.mail_source_policy to SPECIAL_ADDRESS and supply the address in messaging.force_from_address, but this doesn't help me because it changes it for all jobs.  I've also tried the "REPLY TO" equivalent to this.

3)

I also have script that uses the Java class to send emails directly rather than through the sendNotification function.  This works, but I can't use predefined templates and it doesn't put any entries in the "Processed Messages" log.

If anyone has gotten this to work or can point out what I'm doing incorrectly, please let me know.

Thanks in advance,

Mike

Accepted Solutions (1)

Accepted Solutions (1)

former_member89217
Contributor
0 Kudos

We had an internal discussion about this earlier today.  There seems to be 2 different thoughts on what the "FROM" address should mean.  Typically with externally facing emails providing a "user email" is most likely inappropriate as you would not want this potential side channel (out of system) conversation.  Nor would you disclose individual users email addresses to external users. For internal only mail I see the point that a particular template might want to use a particular user email address.  I beloieve the implemenatation of this IAPI uses the more convservative approiach wherby it just grabs the "FROM" email address that is defined at the company level.  You might want to submit an enhancement request that will allow this use case.

Regards,

Gary

Former Member
0 Kudos


Thanks for the reply.  Interesting coincidence...

The situation we have is we have some shared MS Exchange mail boxes which are used to communicate with external sell-side users for things like Insurance Certification and Diversity Certification. Because our organization is large, different groups of people do these tasks.

I think the key in our situation is these are custom scripts which always have a constant FROM address (one of the shared mailboxes) based on the activity rather than a varying one from based on document collaborators or something similar.  So, in this case, there is no risk of exposing internal email addresses to external users. Using the shared mailboxes prevents this and allows them to collaboratively process responses.

Also, I would think the script writer would be responsible for knowing which account they expose on the call, but perhaps there is legacy code out there that relied on the fact that the parameter was apparently ignored anyways... So perhaps, you could just add another constructor to handle this case? This wouldn't break any existing code.

BTW, we ask users to reply to the shared mailbox, but they often hit reply and their email gets delayed until someone forwards it out of the company-wide box. We'd really like to offer them the convenience of simply hitting reply.

Thanks again,

Mike

former_member89217
Contributor
0 Kudos

If you were able to use the "Sender" field at the custom template level would that fit the requirement?

Thanks,

Gary

Former Member
0 Kudos

Yes.  I think it would.

It would be great if we could open that field up somehow in our current version: Wave 9 SP 13-- even if it's by a customization.  I looked for awhile, but didn't come up with any work-around.

Thanks,

Mike

former_member89217
Contributor
0 Kudos

this would require a code change. I would submit the enhancement request but I will also suggest this a a potential solution for your use case.

Gary

Former Member
0 Kudos

Will do.

Sorry,  I've never submitted an enhancement request. Basically just do it somewhere on the support site I presume?  If there's anything special to it, please let me know the procedure.

Thanks again,

Mike

former_member89217
Contributor
0 Kudos

same tool as submitting a bug but with lower priority and the description should include that this is an enhancement request.

Gary

Former Member
0 Kudos

Gary-

I added:
ENHANCEMENT: Allow changing message Sender ( 720016 /
2014 )

Not sure if the link will work, but the title and number are listed.

Thanks again,

Mike

Answers (0)