UVdesk Swiftmailer with Gmail - mail not sending - swiftmailer

Here's the error message i keep getting. I have tried setting the php.ini sessions and i still get this error.
I changed the yaml file to connect directly to gmail & confirmed the account.
[2022-07-13T01:16:45.625052+00:00] deprecation.INFO: User Deprecated: Since symfony/security-bundle 5.4: Setting
the $authenticatorManagerEnabled argument of "Symfony\Bundle\SecurityBundle\DataCollector\SecurityDataCollector
::__construct" to "false" is deprecated, use the new authenticator system instead. {"exception":"[object] (Error
Exception(code: 0): User Deprecated: Since symfony/security-bundle 5.4: Setting the $authenticatorManagerEnabled
argument of \"Symfony\\Bundle\\SecurityBundle\\DataCollector\\SecurityDataCollector::__construct\" to \"false\"
is deprecated, use the new authenticator system instead. at /var/www/uvdesk/vendor/symfony/security-bundle/Data
Collector/SecurityDataCollector.php:52)"}

Related

Error when trying to access Spartacus pages during SSR while AuthService is imported and redirectUri specified in the OAuth config

The Spartacus app works fine without SSR enabled. After enabling SSR, it builds fine (yarn buikd:ssr), however when I try to access the main page (yarn dev:ssr) I got the following error:
TypeError: Cannot read property 'location' of undefined
at OAuthLibWrapperService.initialize (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:194105:819)
at new OAuthLibWrapperService (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:194100:14)
at Object.OAuthLibWrapperService_Factory [as factory] (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:194172:167)
at R3Injector.hydrate (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:159836:35)
at R3Injector.get (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:159657:33)
at injectInjectorOnly (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:149394:33)
at ɵɵinject (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:149398:57)
at Object.AsmAuthService_Factory [as factory] (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:212641:426)
at R3Injector.hydrate (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:159836:35)
at R3Injector.get (/Users/XXX/YYY/ZZZ/store/dist/store/server/main.js:159657:33)
Spartacus version is 3.0. In the shell app we make use of AuthService, error disappears when we remove all imports of it. Error is not present also if we remove the redirectUri from the OAuthLibConfig (while AuthService is imported) but this is not our case as we want have it specified.

Office 365 gives bad sequence error on laravel

I am trying to user office 365 in my laravel site but for some reason, it does not work and I see the following error in my laravel.log:
[2018-12-04 20:50:59] production.ERROR: Expected response code 354 but got
code "503", with message "503 5.5.1 Bad sequence of commands
" {"exception":"[object] (Swift_TransportException(code: 503): Expected
response code 354 but got code \"503\", with message \"503 5.5.1 Bad
sequence of
commands \" at
/home/forge/owlcrest.co.za/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Tra
nsport/AbstractSmtpTransport.php:457)
[stacktrace]
I am hosting the website with forge.
and all the smtp details are in the .env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.office365.com
MAIL_PORT=587
MAIL_USERNAME=email#odestdf.com.za
MAIL_PASSWORD=fakepasword
MAIL_ENCRYPTION=STARTTLS
I even tried changing the encryption to "tls" but I still see the same error.
Has anyone experienced this before?
EDITED:
Everything was working, but suddenly I see the following error when I see try to send an email:
Expected response code 250 but got code "554", with message "554 5.2.0 STOREDRV.Submission.Exception:SubmissionQuotaE$
" {"exception":"[object] (Swift_TransportException(code: 554): Expected response code 250 but got code \"554\", with message \"554 5.2.0 STOREDRV.Submission.$
\" at /home/forge/owlcrest.co.za/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:457)
Now I am completely confused.
Change the value of MAIL_ENCRYPTION to tls instead of using STARTTLS.
Please also make sure the MAIL_FROM_ADDRESS to your Office365 email address.

Failed to authenticate on SMTP server with username "yea****" using 2 possible authenticators

I'm trying to set up email for a Laravel project using SendGrid.
When following their documentation I get an error (https://sendgrid.com/docs/Integrate/Frameworks/laravel.html)
The .env looks like this
MAIL_DRIVER=smtp
MAIL_HOST=smtp.sendgrid.net
MAIL_PORT=587
MAIL_USERNAME=yea****
MAIL_PASSWORD=*********
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="John Smith"
MAIL_FROM_ADDRESS=from#example.com
The error i get looks like this
ErrorException (E_WARNING)
stream_socket_enable_crypto(): Peer certificate CN=`****.****.***' did not match expected CN=`smtp.sendgrid.net'
/home/myusername/public_html/api/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php
public function startTLS()
{
// STREAM_CRYPTO_METHOD_TLS_CLIENT only allow tls1.0 connections (some php versions)
// To support modern tls we allow explicit tls1.0, tls1.1, tls1.2
// Ssl3 and older are not allowed because they are vulnerable
// #TODO make tls arguments configurable
return stream_socket_enable_crypto($this->stream, true, STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT | STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT);
}
Arguments
"stream_socket_enable_crypto(): Peer certificate CN=`****.****.***' did not match expected CN=`smtp.sendgrid.net'"
I fixed this error by using the code provided in this answer (https://stackoverflow.com/a/45315825).
I know this is bad practice but i got another error.
Swift_TransportException
Failed to authenticate on SMTP server with username "yea****" using 2 possible authenticators. Authenticator LOGIN returned Swift_TransportException: Expected response code 235 but got code "535", with message "535 Incorrect authentication data " in /home/myusername/public_html/a[i/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php:456 Stack trace: #0
/home/myusername/public_html/api/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php
$message = 'Failed to authenticate on SMTP server with username "'.$this->username.'" using '.$count.' possible authenticators.';
foreach ($errors as $error) {
$message .= ' Authenticator '.$error[0].' returned '.$error[1].'.';
}
throw new Swift_TransportException($message);
}
}
This looks like some kind of authentication error to me, I am using the same credentials i use to login to the SendGrid dashboard.
any ideas on how to fix these problems?
My solution for this case was double-quote the username, password and port number.
Then I got another error, like this:
'''
Connection to tcp://smtp.hostx.com:465 Timed Out
'''
Connection to tcp://smtp.hostx.com:465 Timed Out
and I fix it changing MAIL_ENCRYPTION from tls to ssl:
MAIL_ENCRYPTION=ssl
I hope this helps someone else due to this post is too old.

getting error while deploying laravel 5.5 project

Deploying my laravel project on Linux hosting using cpanel. Project running on localhost very well but once i put on hosting, it is giving me following error.
Warning: require_once(): It is not safe to rely on the system's
timezone settings. You are required to use the date.timezone setting
or the date_default_timezone_set() function. In case you used any of
those methods and you are still getting this warning, you most likely
misspelled the timezone identifier. We selected the timezone 'UTC' for
now, but please set date.timezone to select your timezone. in
/home/sachinpa/public_html/public/index.php on line 52
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting
identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in
/home/sachinpa/public_html/public/index.php on line 52.

Can't Setup Ratchet

I am trying to setup Ratchet on my system and have followed socketo.me
I have done everything till installing ZMQ and React/Zmq and it was all successful.
But when I try to run push-server.php, the following error occurs:
Fatal error: Uncaught exception 'InvalidArgumentException' with message 'The provided listener was not a valid callable.' in C:\wamp\www\ratchet\vendor\evenement\evenement\src\Evenement\EventEmitter.php on line 21
InvalidArgumentException: The provided listener was not a valid callable. in C:\wamp\www\ratchet\vendor\evenement\evenement\src\Evenement\EventEmitter.php on line 21
I have already set the PATH variable and enabled the php_zmq extension(I am on Windows using WAMP).
I have searched a lot but can't get through this problem, please help.
What have you done ?
You have changed the event to be called
$pull->on('message', array($pusher, 'onBlogEntry'));
you have changed the onBlogEntry with a function that you didn't declare in your pusher ..
that's it

Resources