-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated callback.phps #2305
Updated callback.phps #2305
Conversation
Update example
That doesn't look right - the
should become
so that it contains all info about the recipient. |
Ohh yes, that was the problem! |
It should be so yes
The example would only be correct if both information were present (array with address and name). |
It's actually a bit more involved – the use of
but in other places the whole of
The first case should be amended to match the second pattern. |
There is also another problem
By doing this, the parameters cc and bcc aren't updated in the $callbacks array. Only the to parameter is updated. |
I have pushed a change in master that should make calls to |
There still seems to be the problem. Maybe the change should be made here too? |
No, because the |
Ok found the problem. |
Thanks, I missed that one, fix pushed |
Tested, now it works! |
What problem? The original callback example should now work correctly? |
The original callback example now it works, now to it's an array of arrays.
|
I don't think that really applies here. At the SMTP level there is no distinction between to, cc and bcc – they are all just |
Ok, so in the callback i will have all the addresses in the parameter to? Even if they were added as CC or BCC? |
No, with SMTP you will get a separate callback for each message recipient. I don't think it's important whether the address was originally in to, cc or bcc, because you were the one that set them! The mail() transport behaves differently because you don't get that opportunity, and you will get all of to, cc, and bcc in a single hit, broken out into those params, and you can't tell which address failed. If it acted the same way for SMTP, you would not be able to get the separate error status for each recipient that you were originally looking for. |
Maybe i explained myself wrong, sorry. With SMTP a separate callback for each message recipient it's perfect. But in this case :
in the callback function the parameters to, bcc and cc will they be like this?
and not so?
|
No, you will get three separate callbacks, each time with a different
Whether an address is to, cc, or bcc has no bearing on the sending status – you're never going to have an address that fails in With the mail() transport you will get your second example, because it only gets called once, with all recipient addresses. |
I have explained myself badly once again, perfect 🤣 |
Updated example