Does anyone have user (not system) outbound e-mail working on 7.9.x?

Hi, I’m trying to get user outbound e-mail working on 7.9.17. The system settings seem fine, as I can send a test e-mail from there. Inbound e-mail is working, as I see my e-emails as I see them in Gmail, but I cannot for the life of me figure out what is preventing outbound e-mails from working. Getting the “Error sending e-mail” dialog and the “user attempted to send an e-mail using incorrect e-mail account settings in which they do not have access to” in the log file.

Thanks!

Do you happen to have the same account set as an Outbound account in Admin / Outbound? Is the checkbox to “allow access” ticked?

Yes, both inbound and outbound are the same; the behavior is the same regardless of the checkbox setting. Note, I am not attempting to send e-mail as the system account (notifications work fine) but I am attempting to send mail as my user account. The only thing that I’ve gotten working is to comment out the logic that calls the authentication section of code, per guidance given elsewhere in this forum. It appears that a bug still exists in that logic regarding who is allowed to do what in terms of outbound e-mail. I suspect it is something to do with group email (I have no groups defined) but that’s just a hunch.

Sorry, I mis-read your e-mail; yes, in this case the admin e-mail and the user e-mail are the same (this is a testing configuration) and again, the checkbox setting doesn’t seem to make a difference. But, in my production instance that is not the case, the system account there is in fact a system account, not a user account.

How are your folders configured for that account, in user profile, for Inbound? I am wondering if there could be some bug with the “Sent” IMAP folder not being mapped to the server, or something.

I have isolated the issue to logic contained within the EmailsController.php, in the section related to setting (or not, in this case) the variable “isAllowedToUseOutboundEmail”. BLUF, that variable is not set, for the settings I have chosen, so it is therefor false, making the whole condition that dictates this authorization false (there are three elements that contribute to it). The code searches for an e-mail account type of “user”, but it appears that the database tables contain account type of “personal”, but changing that didn’t fix the problem. Getting closer 'tho!

ok, so it is a configuration issue; it appears that the only way I can make it work is to NOT have the “allow use of the system account” checked, and to supply personal credentials for the outbound e-mail server. That works without hacking the code. That said, is SHOULD work with the “allow use …” checked, right? I can find no configuration that actually works when this is set.

Nice detective work. :slight_smile:

In the database, you mean that the outbound_email table has a row which has a “type” field set to “personal”? Or is it somewhere else?

That was a red herring; it should be set to user, as “personal” is a user tag only.