Cannot re-use Hazaar\Mail\Adapter to send multiple emails via SMTP #218
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
experiment
suggestion
support
Testing
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/framework#218
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There seems to be an issue with the socket used to connect to the SMTP server.
Example, with the default transport configured as SMTP:
The first email will be sent, but the second will throw an exception:
Found the issue. It was pretty simple. I was using
unset($this->socket);
instead of$this->socket = null;
which meant the local member variable would no longer exist on the second attempt to send stuff.