Hey guys, I’m banging my head against the wall as I haven’t found a way to do what I want.
I thought it would be pretty simple, but now I’m not sure it is even possible.
We have epicor set up to send mail from the server from a “noreply” address. It works fine and sends fine.
I’d like to be able to override the from field when sending an ssrs report. (I would give noreply send on behalf of permission.)
I can do this in a BPM call with the mailer if I do this myself, but I can’t seem to find any intercept where I can change this field when done from a report. I’ve been through method directives all morning looking and debugging. I’m at a loss.
Anyway, Is this even possible? Any insights would be appreciated.
Correct me if I’m wrong, but doesn’t APR still use the mail configuration set in the company settings? I think you can spoof the “from” email in APR but the actual server is the same
If you leave From Blank it will pull from Company Settings
If you fill out the from with something@yourdomain.com it will use that (spoof via smtp)
If you want to get the Users Email (APR isnt build for that), you will have to modify your RDD (Report Data Definition and join on the table UserFile based on lets say InvcHead.SalesRepEmail_c or something like ChangedBy
So instead of messing with RDDs because you can very quickly destroy your ARForm RDD by adding a bunch of metadata joins. What most people do is they add fields to the Company Table such as:
Company.SalesEmailAddr_c
Company.AREmailAddr_c
Company.APEmailAddr_c
Because Company is a table that is ALREADY in 99.9% of RDDs, they simply include it and viola, no joins. But then the email comes atleast from lets say accounting@yourdomain.com.
In more simpler terms there is no way to get like Session or CurrentUserEmailAddr easily in Routing.
I was told the Advanced APR (DocStar) version has more control, but not the basic edition.
I just find it odd that with as much stuff as they expose in epicor, I can’t believe that they didn’t expose it as a business object that can be used/traced/and modified. Just a black hole.
I haven’t found many black holes in Epicor. They expose just about everything!
I think it’s more the nature of SMTP, which has been roundly abused over the years, including people changing the From: address for phishing and spamming. O365 does expose this because it’s using a client agent that confirms who you are or if you have the security to send on-behalf of another user. SMTP just doesn’t check.
The other reason to use something like the MS Graph is that it handles failures better. With SMTP, if the first server hit is not successful, your message is gone. Where does that error go? Into that black hole… And you may or may not know, I’m not a big fan of any application given access to SMTP. It’s “what we used to do” but we need to find more secure and resilient ways to notify people and stop using email directly - IMHO.
I’m pretty much with you on most of that. If they exposed it at the programming level though, we could intercept and add our own stuff there while not having to touch so many places if you want to add functionality.