LABKEY.Message.sendMessage and a reply address that doesnt exist

LabKey Support Forum (Inactive)
LABKEY.Message.sendMessage and a reply address that doesnt exist Ben Bimber  2011-08-31 11:06
Status: Closed
 
Our site triggers some automatic emails, primarily from within server-side validation scripts. The site is configured to have a site address of 'ehr-do-not-reply', which is a non-existent email, since we dont want people to reply to these automatic emails, since no one is reading them.

I just found out that LABKEY.Message.sendMessage will not let me use this email as the sender, probably b/c it's not associated with a valid user. Any way around this, besides making a bogus labkey account to go with the bogus email?

FWIW, it'd be quite convenient if an API existed to either:

1. identify the site email address
2. be able to specify 'send using the site's email address' when using LABKEY.Message.sendMessage

Thanks for any suggestions.
 
 
Ben Bimber responded:  2011-08-31 11:20
actually i might have misdiagnosed that. the inability to determine the site's email from the client/validation script is still an annoying limitation though. for the EHR i ended up creating a table called 'module_properties' where i tuck info like that. not the best solution though.
 
Ben Bimber responded:  2011-08-31 11:36
nope, the original diagnosis was right. appears the 'from' email needs to match a site user.

if true, this brings a question. i assume the restriction on emails is so the API cant be exploited. however, does this mean any site user could in theory send out emails that appear to have been sent from any other site user? are there restrictions on who can be sending emails from who's email?