Swift_TransportException Connection to ssl://mail.mydomain_name.com:465 - laravel

I am working with laravell 8.77.1 . When I am trying to send from my application, gettig this error
Swift_TransportException Connection to ssl://mail.mydomain_name.com:465
Swift_Transport_AbstractSmtpTransport::getFullResponse
vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:475.
I am new to Laraval.
Any help would be apperciated.

You should enter a valid mail server and all other properties in your .env file.
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

Related

Email not sending in laravel 7

when i am using
MAIL_MAILER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=xxxx
MAIL_PASSWORD=xxxxx
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=xxxxxx
MAIL_FROM_NAME="${APP_NAME}"
so it is giving this error
Connection could not be established with host smtp.gmail.com :stream_socket_client(): unable to connect to tcp://smtp.gmail.com:587 (Network is unreachable)
while when i am using
MAIL_MAILER=sendmail
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=xxxx
MAIL_PASSWORD=xxxxx
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=xxxxxx
MAIL_FROM_NAME="${APP_NAME}"
so then error is not showing but email is not receiving on the other hand so please anyone help me here in this issue that where i am doing the error
Controller code is
Mail::send('email.username_email',['data'=>$data],function ($message){
$message->from("xxxxx", "HCML Lab");
$message->subject('UserName Change');
$message->to("xxxxxx");
});

im getiing fwrite() when i try to send email through laravel

I was sending normal until I start getting this error
fwrite(): send of 18 bytes failed with errno=10054 An existing connection was forcibly closed by the remote host.
this is my .env
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=4fe075e8cb5300
MAIL_PASSWORD=5800191ac8e718
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=hello#example.com
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
FILESYSTEM_DRIVER=public
and this is my config file
what is the problem here

Connection could not be established with host smtp.gmail.com [Connection refused #111]

MAIL_DRIVER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME=sample#gmail.com MAIL_PASSWORD=passowrd MAIL_ENCRYPTION=tls
Its working fine on local but on the server its not working and gives me this error:
Connection could not be established with host smtp.gmail.com [Connection refused #111]

Cannot connect to sqLite when testing Laravel

I get this error when trying to execute my tests (Laravel 5.3):
PHPUnit 5.7.13 by Sebastian Bergmann and contributors.
E{"sError":"An error occurred while connecting to the database ':memory:'. The error reported by the server was: SQLSTATE[HY000] [1044] Access denied for user 'mick'#'%' to database ':memory:'"}
phpUnit.xml
<php>
<env name="APP_ENV" value="testing"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
database.php
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],
What am I doing wrong? These settings work OK in another project?
I am not using config caching.
It looks like it is still using the values from my .env
Mick
EDIT: Just came back to this, I am using this to debug:
$string ="Name: " . DB::connection()->getName() . " DB: " . DB::connection()->getDatabaseName() . " Driver: " . DB::connection()->getDriverName();
So, If I do this before the line that causes the error, I get:
"Name: sqlite DB: :memory: Driver: sqlite"
Then, this code executes:
$this->actingAs($user)
->visit('/')
->click('Categories');
and again, I get the error:
{"sError":"An error occurred while connecting to the database ':memory:'. The error reported by the server was: SQLSTATE[HY000] [1044] Access denied for user 'mick'#'%' to database ':memory:'"}
If I just do this:
$this->actingAs($user)
->visit('/');
Then the test executes OK.
The error message you report in your question:
An error occurred while connecting to the database ':memory:'. The error reported by the server was: SQLSTATE[HY000] [1044] Access denied for user 'mick'#'%' to database ':memory:'
This shows that not a Sqlite database is used but a Mysql one. I'm not fluent with Laravel at all, but I'd say there is some fall-back to Mysql in action. For testing purposes I would remove the Mysql from the overall configuration and see what that turns up.
That's quite different to what you decided to do, that is to switch to Mysql entirely (according to your post on the Laracast forums).

Proxy for ethereum wallet

Env: Ubuntu 16.04
I am working behind a proxy. Wanted to know how to pass the proxy info to the Ethereum wallet.
My http_proxy and https_proxy are set still it is not taking
when i start the ethereum wallet i see that following error
[2017-07-25 11:12:15.030] [ERROR] updateChecker - Error checking for update { RequestError: Connection timed out on request to api.github.com
at ClientRequest.req.once.err (/home/nokia/go-ether/mist/linux-unpacked/resources/app.asar/node_modules/got/index.js:73:21)
at ClientRequest.g (events.js:286:16)
at emitOne (events.js:101:20)
at ClientRequest.emit (events.js:188:7)
at Timeout.timeoutHandler (/home/nokia/go-ether/mist/linux-unpacked/resources/app.asar/node_modules/timed-out/index.js:16:8)
at tryOnTimeout (timers.js:232:11)
at Timer.listOnTimeout (timers.js:202:5)
code: 'ETIMEDOUT',
message: 'Connection timed out on request to api.github.com'
which i think is coming because it is not able to access proxy settings.
So how can i pass the proxy info to the wallet
Thanks

Resources