# |
Oct 4th 2018, 10:54 |
narendravaghela |
:) |
# |
Oct 4th 2018, 10:54 |
neon1024 |
You mean like the `mail()` function :P |
# |
Oct 4th 2018, 10:54 |
narendravaghela |
@neon1024 yes, but having some basic features inbuilt is a good thing :slightly_smiling_face: |
# |
Oct 4th 2018, 10:53 |
neon1024 |
How many records are you working with? |
# |
Oct 4th 2018, 10:53 |
btx |
chunk seems like it needs the data prior to being called - but it should be easy enough to test |
# |
Oct 4th 2018, 10:52 |
btx |
hmm i wonder if I did a for loop with pagination or something instead |
# |
Oct 4th 2018, 10:51 |
neon1024 |
I guess you could argue scope all day though |
# |
Oct 4th 2018, 10:51 |
neon1024 |
Having lots of features is RAD, but you gotta maintain them all and compete with all the other package maintainers |
# |
Oct 4th 2018, 10:50 |
narendravaghela |
:slightly_smiling_face: |
# |
Oct 4th 2018, 10:50 |
neon1024 |
Then if you wanted to use SwiftMailer or something you could drop that in |
# |
Oct 4th 2018, 10:50 |
neon1024 |
Spin it off into a plugin |
# |
Oct 4th 2018, 10:50 |
neon1024 |
I’d remove it |
# |
Oct 4th 2018, 10:50 |
narendravaghela |
You can update Email class :) |
# |
Oct 4th 2018, 10:49 |
neon1024 |
It should be better than that |
# |
Oct 4th 2018, 10:49 |
narendravaghela |
https://github.com/cakephp/cakephp/blob/master/src/Mailer/Email.php#L955 |
# |
Oct 4th 2018, 10:49 |
neon1024 |
This stuff kinda makes me feel a bit uncomfortable |
# |
Oct 4th 2018, 10:49 |
neon1024 |
https://3v4l.org/06lEa :) |
# |
Oct 4th 2018, 10:48 |
btx |
hmm that’s a new one lemme check |
# |
Oct 4th 2018, 10:48 |
neon1024 |
Perhaps you could use Collection::chunk ? |
# |
Oct 4th 2018, 10:47 |
btx |
probably streaming yeah, like return 1000 records, free up memory, do the next 1000 |
# |
Oct 4th 2018, 10:47 |
neon1024 |
Or do you mean streaming? |
# |
Oct 4th 2018, 10:46 |
neon1024 |
@btx Sure, you can use `ob_start()` and `ob_end_flush()` |
# |
Oct 4th 2018, 10:46 |
btx |
is there a way to .. buffer? .. results to the screen? I have an XML file that needs to be generated (Facebook Product Catalogue) and the dataset is too large to pull all at once |
# |
Oct 4th 2018, 10:45 |
neon1024 |
Oh well |
# |
Oct 4th 2018, 10:45 |
neon1024 |
It feels like that could be removed |
# |
Oct 4th 2018, 10:45 |
narendravaghela |
if it is a string, it makes it an array with email as key and value |
# |
Oct 4th 2018, 10:44 |
narendravaghela |
Email class checks if the key is string or array |
# |
Oct 4th 2018, 10:44 |
narendravaghela |
:thinking_face: |
# |
Oct 4th 2018, 10:43 |
neon1024 |
Cakes email class isn’t great |
# |
Oct 4th 2018, 10:43 |
neon1024 |
I wonder why I am bothering trying to convert Cake Email into SendGrid, when I could just implement SendGrid directly |
# |
Oct 4th 2018, 10:42 |
neon1024 |
:thinking_face: |
# |
Oct 4th 2018, 10:42 |
neon1024 |
https://3v4l.org/Gd86j |
# |
Oct 4th 2018, 10:39 |
narendravaghela |
:thumbsup: |
# |
Oct 4th 2018, 10:39 |
neon1024 |
Thanks @narendravaghela that makes sense |
# |
Oct 4th 2018, 10:39 |
neon1024 |
So the email is always the key |
# |
Oct 4th 2018, 10:39 |
narendravaghela |
if you pass blank for name, it will keep email as name |
# |
Oct 4th 2018, 10:38 |
narendravaghela |
`['example@example.com', 'example.second@example.com' => 'foo']` |
# |
Oct 4th 2018, 10:38 |
neon1024 |
I should check the tests, that’s probably a good idea |
# |
Oct 4th 2018, 10:37 |
neon1024 |
What if I mixed both? |
# |
Oct 4th 2018, 10:37 |
narendravaghela |
getTo() returns array |
# |
Oct 4th 2018, 10:37 |
neon1024 |
In which case, what does `getTo()` return? An array, or array of arrays |