Support the ongoing development of Laravel.io →
Mail Laravel

Hi everyone, i was working on my localhost on app that send emails to mailtrap and when i uploaded it to server and editing the .env file it doesn't send anything and gives me this error

Swift_TransportException

Connection to chi-node16.websitehostserver.net:465 Timed Out

Last updated 3 years ago.
0

Try changing the MAIL_ENCRYPTION to TLS or the MAIL_PORT to 25 or 465

0

i changed my the port to 25 and the encryption to null it worked but for only one email and the other emails not working. it sends only to a specific email even i am making it dynamic:

// mail $user = User::find($request->user_id);

    $email = $user->email;


    Mail::send('site.pages.messageDraft', ['order'  => $order, 'user' => $user],
        function($message) use ($email) {
            $message->from('arabea169@gmail.com', 'BuyOnline');
            $message->to($email)->subject('New Order');
        });

    return ['status' => 'success'];
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.