Tuesday, June 29, 2010

When sysMailer.quickSend isn't sending any mails

After rather many hours of debugging and hairpulling, I have figured out that you in order to send mails with sysMailer.quickSend, must have View rights to the security key Adminstration / Daily. You don't need to have access to any of the subnodes however.

The cause is that sysMailer.quickSend in order to find the password to the SMTP server, calls SysEmailSMTPPassword::currentAOSInstance, which again makes a select statement to the SysServerSessions table.

The SysServerSessions table must somehow be linked to the above mentioned security key, because without access to this, AX simply exits the metod on that select statement, just as if it had hit a Return statement - and no errors or other hints about the mail not being sent are displayed.