So if this is not working the only thing that can be wrong are the credentials. I've read that elasticemail sometimes requires you to use the api key as the username, depending on how you registered. You could give that a try?
Otherwise ask support for the correct credentials ;)
LogicException : Unable to prepare route [api/user] for serialization. Uses Closure.
at /var/www/laravel/vendor/laravel/framework/src/Illuminate/Routing/Route.php:917
913| */
914| public function prepareForSerialization()
915| {
916| if ($this->action['uses'] instanceof Closure) {
> 917| throw new LogicException("Unable to prepare route [{$this->uri}] for serialization. Uses Closure.");
918| }
919|
920| $this->compileRoute();
921|
Exception trace:
1 Illuminate\Routing\Route::prepareForSerialization()
/var/www/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteCacheCommand.php:62
2 Illuminate\Foundation\Console\RouteCacheCommand::handle()
/var/www/laravel/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:29
Please use the argument -v to see more details.
@SNAPEY - i did config('mail') and it matches what I intend to. And also checked the quotes around password.
The issue here is, when i trigger a mail, it is sending to mailtrap which i used for testing purpose but now i have replaced it with elastic mail credentials, but the mail is being received in mailtrap.
Email not working can have more than dozen of reasons, it's better to check the log first, either laravel or the server log may helpful to identify the root cause.
By the way, is the elasticemail_username using full email address?
In this case, i would first simply telnet to smtp port from the server and test out the credential with the server and send a message through smtp protocol.
@GOUSEFEROZ - reverse back the steps you changed one by one and dd() out the credentials of each point before it hit to find out the real cause of the issue.
I came across this post: https://stackoverflow.com/a/49819941
I am on cloudways as well, it is weird, but the API key works in place of user name and password.
Since I signed up for elastic email through cloudways, all what cloudways provided was API key, no other instructions. Still not sure is that how it suppose to be.