cancel
Showing results for 
Search instead for 
Did you mean: 

Issue regarding sender mail id in custom email Notifications

former_member207877
Active Participant
0 Kudos

Hello All,


In general we will be using NotificationUtil class for sending custom mail notifications.

Below is the method which we use most frequently.

NotificationUtil.sendNotification(java.lang.String[] recipients, IapiAccountIfc sender, MailTypeEnum notificationType, java.util.Properties notificationParameters, java.lang.String attachmentDisplayName, java.io.InputStream attachment) ;

If you see the sender parameter in above method, we have to use IapiAccountIfc which can be fetched below.

sender = session.getAccount();

Lets say sender is user "USERSCN" and the respective

user mail id is "user.scn@sap.com" and

user's company mail id is "noreply.scn@sap.com"

In the mail notification which is sent out what would be the sender email in the notification as per above data?

In our Sourcing Application i.e, Sourcing 9 SP14 mail is getting triggered such that sender mail id is getting fetched from company

But after upgrading to Sourcing 10 SP4  mail is getting triggered such that sender mail id is user email itself.

Why its not behaving the same way as it was before upgrading?

Please clarify

Regards,

Raj

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190023
Contributor
0 Kudos

Hi Raj,

I remember this issue when transitioning from V9 to V10. The behaviour changed as a result of a (presumed) bug-fix.

In general, the email notification will override the 'sender' address with the value from the email template config (hardcoded config). For custom email templates, the Sender field is BLANK. Question is ... "what should be the sender address in the case of BLANK setup?"

In V9 it was defaulting to 'company address', but in V10 the code is picking up the selected user account address.

In our case, we were sending these emails from a ProcessOwner user, so we changed the email address to the company address to 'fix' this problem.

If you are sending the emails from a buyer user account, there's no standard way you could change the behaviour for onlythis email type.

Bogdan