Closed (fixed)
Project:
Mailer Plus (DSM+)
Version:
1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Dec 2021 at 09:41 UTC
Updated:
27 Dec 2021 at 12:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
jeroentComment #4
jeroentComment #5
adamps commentedThanks looks good I have just one small question
Comment #6
jeroentI reverted the change.
Comment #7
adamps commentedThanks for the response. I tested the fix (it now needs a reroll which I hacked locally), and I think I found why you added the change you just reverted 😃.
Typed property Drupal\symfony_mailer\Email::$transportDsn must not be accessed before initializationThe "" mailer DSN must contain a scheme.getTransportDsn()if the field is NULL throw an exception something like thisMissing email transport: please configure a default.it could maybe even link to the config page??Comment #8
adamps commentedI plan to create a new release soon. If you would be ready to finish off this issue quite quickly then I can wait so that it is included - please let me know if you wish to do that.
Comment #9
jeroentI’ll try to update the MR on monday.
Comment #10
adamps commentedGreat many thanks. I realise my comment #7 was unclear. I think you had it almost right before I reviewed it - sorry😃. I think keep the code to initialise $transportDsn to '', as this ensures that
getTransportDsn()is safe to call anytime.Then the clearer error message in case of the transport being unset would presumably go in
Mailer::doSend()?? Anyway I'm sure that once you start coding it, then things will become clear.Comment #11
jeroentI updated the MR.
I tried to add something like:
but the link doesn't get rendered in the warning message:

So for that reason I created a separate exception.
Comment #12
adamps commentedThanks, looks good - just one little thing to fix
Comment #13
jeroentI updated the MR.
Comment #14
adamps commentedThanks