Reputation: 4704
Exception email sent by Monolog at a shared host are not received when using a cloud host. Host is an Azure Ubuntu 16 VM. sendmail
is installed on the VM and test emails are received. parameters.yml
at the VM contain the same mailer_...
parameters as at the shared host.
There are no entries related to email in the prod log when a CRITICAL: Uncaught PHP Exception Exception
exception is forced. The custom exception page is displayed on the error.
config_prod.yml includes:
monolog:
handlers:
mail:
type: fingers_crossed
action_level: critical
handler: deduplicated
deduplicated:
type: deduplication
handler: swift
swift:
type: swift_mailer
from_email: '[email protected]'
to_email: %mailer_user%
subject: 'An Error Occurred!'
level: debug
formatter: monolog.formatter.html
content_type: text/html
Edit:
Using the FOSUserBundle password reset mechanism to generate emails I get prod log entries that may be significant. With the username & password in parameters.yml
for mailer_...
, the reset process yields:
CRITICAL: Uncaught PHP Exception Swift_TransportException: "Failed to authenticate on SMTP server with username...
If there are no entries for mailer...
the error is:
Expected response code 250 but got code "530", with message "530 5.7.0 Must issue a STARTTLS command first
yet I've found no mention of sendmail configuration of TLS, or requiring authentication. If I did, I say it's not required.
Upvotes: 0
Views: 455
Reputation: 4704
The best I can figure is that sendmail by itself was insufficient, or my ability to work with it was even more insufficient. So I installed postfix on top, added no configuration to postfix, rebooted, and now exception emails are sent. (And received, once my email 'learned' that they weren't spam!)
Upvotes: 1