I'm working in laravel 5.2
on PHP version 5.6.25
. I'm getting issue with swiftmailer library to send emails. I'm getting this error when sending email on my live server
InvalidArgumentException in Response.php line 458:
The HTTP status code "0" is not valid.
When I searched online regarding this issue. Then got solution for this to add one line vendor/swiftmailer/swiftmailer/lib/swift_required.php
file.
require dirname(__FILE__).'/swift_init.php';
But this line is already added in this file. But inside a function which is loading using autoloading. Below is the code of this file
if (class_exists('Swift', false)) {
return;
}
// Load Swift utility class
require dirname(__FILE__).'/classes/Swift.php';
if (!function_exists('_swiftmailer_init')) {
function _swiftmailer_init()
{
require dirname(__FILE__).'/swift_init.php';
}
}
// Start the autoloader and lazy-load the init script to set up dependency injection
Swift::registerAutoload('_swiftmailer_init');
It seems that last line Swift::registerAutoload('_swiftmailer_init');
is not working.
This issue is getting on live server.. But working properly on my local server and testing server also. My local server has '5.5.9' php version. Please help me on this.
Thanks in Advance.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2cbZScF
via IFTTT
Aucun commentaire:
Enregistrer un commentaire