Fatal error: Uncaught phpmailerException - php

I'm using woocommerce, and other plugins to allow users to add products. When a user adds a new product, the server fails in sending notification, giving this error:
Fatal error: Uncaught phpmailerException:
Invalid address: in /srv/users/serverpilot/apps/xxxx/public/wp-includes/class-phpmailer.php:946
Stack trace:
#0 /srv/users/serverpilot/apps/wordpressthm/public/wp-includes/pluggable.php(352): PHPMailer->setFrom('', 'OneSocial', false)
#1 /srv/users/serverpilot/apps/xxxx/public/wp-content/plugins/woocommerce/includes/emails/class-wc-email.php(466): wp_mail('test#hot...', '[Test Product...', '<!DOCTYPE html>...', Array, Array)
#2 /srv/users/serverpilot/apps/xxxx/public/wp-content/plugins/wc-vendors/classes/admin/emails/class-wc-notify-admin.php(81): WC_Email->send('test#hot...', '[The Hockey Mov...', '<!DOCTYPE html>...', 'Content-Type: t...', Array)
#3 /srv/users/serverpilot/apps/xxxx/public/wp-content/plugins/wc-vendors/classes/admin/emails/class-emails.php(40): WC_Email_Notify_Admin->trigger('', Object(WP_Post))
#4 /srv/users/serverpilot/apps/xxxx/public/wp-includes/plugin.php(524): WCV_Emails->trigger_new_product('pending' in /srv/users/serverpilot/apps/xxxx/public/wp-includes/class-phpmailer.php on line 946
The server is set up with digital ocean

The answer is available in the Exception. The email address of the recepient of the notification or the senders address are somehow invalid.

Related

Unauthorized: 401 Azure Media Service in PHP. How do I connect to Azure Media Service through PHP

I am trying to connect to Azure Media Service through PHP SDK provided by Azure on github. The userconfig.php has few params, I gave all my credentials but I'm getting
"Fatal error: Uncaught WindowsAzure\Common\ServiceException: Fail:
Code: 401"
<?php
set_time_limit(600); //set timeout to 10 minutes, or you can set max_execution_time in php.ini
date_default_timezone_set('America/Los_Angeles');
$tenant = "******.onmicrosoft.com";
$username = '***#*****.com';
$password = '****#12345';
$clientId = "*******-*******-46e9-b525-5f1f2ec4e4ea";
$clientKey = "*******-*******/uUS+hKm67kfwZZs4w4=";
$restApiEndpoint = "https://indwaretest1.restv2.japanwest.media.azure.net/api/";
// $pfxFileName = "C:\\Path\\To\\keystore.pfx";
// $pfxPassword = "KeyStorePassword";
I'm getting this error..
$ php index.php
PHP Fatal error: Uncaught WindowsAzure\Common\ServiceException: Fail:
Code: 401
Value: Unauthorized
details (if any): . in D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\Http\HttpClient.php:405
Stack trace:
#0 D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\Http\HttpClient.php(301): WindowsAzure\Common\Internal\Http\HttpClient::throwIfError(401, 'Unauthorized', Object(GuzzleHttp\Psr7\Stream), Array)
#1 D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\RestProxy.php(144): WindowsAzure\Common\Internal\Http\HttpClient->sendAndGetHttpResponse(Array, Object(WindowsAzure\Common\Internal\Http\Url))
#2 D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\ServiceRestProxy.php(89): WindowsAzure\Common\Internal\RestProxy->sendHttpContext(Object(WindowsAzure\Common\Internal\Http\HttpCallContext))
#3 D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\ServiceRestProxy.php(128): WindowsAzure\Common\Internal\ServiceRestProxy->sendHttpContext(Object(WindowsAzure\Common\Internal in D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\Http\HttpClient.php on line 405
Fatal error: Uncaught WindowsAzure\Common\ServiceException: Fail:
Code: 401
Value: Unauthorized
details (if any): . in D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\Http\HttpClient.php:405
Stack trace:
#0 D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\Http\HttpClient.php(301): WindowsAzure\Common\Internal\Http\HttpClient::throwIfError(401, 'Unauthorized', Object(GuzzleHttp\Psr7\Stream), Array)
#1 D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\RestProxy.php(144): WindowsAzure\Common\Internal\Http\HttpClient->sendAndGetHttpResponse(Array, Object(WindowsAzure\Common\Internal\Http\Url))
#2 D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\ServiceRestProxy.php(89): WindowsAzure\Common\Internal\RestProxy->sendHttpContext(Object(WindowsAzure\Common\Internal\Http\HttpCallContext))
#3 D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\ServiceRestProxy.php(128): WindowsAzure\Common\Internal\ServiceRestProxy->sendHttpContext(Object(WindowsAzure\Common\Internal in D:\PHP\azure\vendor\microsoft\windowsazure\src\Common\Internal\Http\HttpClient.php on line 405
According to the error message, I suppose you have not given a role to your service principal for the media service.
To fix the issue, navigate to the media service in the portal -> Access control (IAM) -> Add role assignment -> select your service principal(just search the clientId ) and give the Contributor or Owner role -> Save, then it should work.
For more details, refer to this link.

Facebook PHP API Error #100: Parameter 'input token' required

I have a Facebook app using the Login with Facebook function which was working earlier and isn't now.
I get the login URL with the following code:
$fb_helper = $login_providers['fb']->getRedirectLoginHelper();
$fb_login_url = $fb_helper->getLoginUrl(/* my callback URL */, array('email'));
At the callback URL, I then use $fb_helper->getAccessToken which returns the following exception.
Fatal error: Uncaught exception 'Facebook\Exceptions\FacebookAuthenticationException' with message '(#100) The parameter input_token is required' in /home/kgur5734/public_html/left/system/libraries/Facebook/Exceptions/FacebookResponseException.php:100
Stack trace:
#0 /home/kgur5734/public_html/left/system/libraries/Facebook/FacebookResponse.php(210): Facebook\Exceptions\FacebookResponseException::create(Object(Facebook\FacebookResponse))
#1 /home/kgur5734/public_html/left/system/libraries/Facebook/FacebookResponse.php(255): Facebook\FacebookResponse->makeException()
#2 /home/kgur5734/public_html/left/system/libraries/Facebook/FacebookResponse.php(82): Facebook\FacebookResponse->decodeBody()
#3 /home/kgur5734/public_html/left/system/libraries/Facebook/FacebookClient.php(225): Facebook\FacebookResponse->__construct(Object(Facebook\FacebookRequest), '{"error":{"mess...', 400, Array)
#4 /home/kgur5734/public_html/left/system/libraries/Facebook/Authentication/OAuth2Client.php(118): Facebook\FacebookClient->sendRequest(Object(F in /home/kgur5734/public_html/left/system/libraries/Facebook/Exceptions/FacebookResponseException.php on line 100
Any ideas, Stack Overflow?

Issue with createFulfillmentOrder Amazon MWS

I'm getting the following error while creating an order for canadian postal code: AB T5T 6V7.
PHP Fatal error: Uncaught exception 'FBAOutboundServiceMWS_Exception' with message 'Value for parameter DestinationAddress.PostalCode is invalid. Reason: InvalidValue.' in /Amazon/FBAOutboundServiceMWS/Client.php:970
Stack trace:
#0 /Amazon/FBAOutboundServiceMWS/Client.php(937): FBAOutboundServiceMWS_Client->_reportAnyErrors('<ErrorResponse ...', '400', Object(FBAOutboundServiceMWS_Model_ResponseHeaderMetadata))
#1 /Amazon/FBAOutboundServiceMWS/Client.php(178): FBAOutboundServiceMWS_Client->_invoke(Array)
#2 /Amazon/functions.inc.php(252): FBAOutboundServiceMWS_Client->createFulfillmentOrder(Object(FBAOutboundServiceMWS_Model_CreateFulfillmentOrderRequest))
#3 /amazon_automation.php(200): invokeCreateFulfillmentOrder(Object(FBAOutboundServiceMWS_Client), Object(FBAOutboundServiceMWS_Model_CreateFulfillmentOrderRequest))
#4 {main}
thrown in /Amazon/FBAOutboundServiceMWS/Client.php on line 970
But it is working for other Zipcodes of Canada.
Can anyone help me on this if I need to change some settings in my sellercentral?
I needed to explicitly check the state and resolve it before sending to FBA.

How to test google market place api with php

I'm trying to use this api http://code.google.com/p/android-market-api/. I would like to get some that from play store. like App name, description, screenshots and download rating(total downloads, week downloads....)
I'm using the php version. I uploaded all the code to my personal server. www.example.com/test/.
Should I configure anything else in addition of local.php, email and password fields? I only did that.
I have this error:
Uncaught exception 'Exception' with message 'HTTP request returned code 400' in /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php:212 Stack trace:
#0 /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php(160): MarketSession->executeRawHttpQuery('??????DQAAAMkAA...')
#1 /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php(147): MarketSession->executeProtobuf(Object(Request))
#2 /homepages/31/d229886149/htdocs/carlos/test/examples/test_categories.php(15): MarketSession->execute(Object(Request_RequestGroup))
#3 {main} thrown in /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php
on line 212
Thank you.
After that I would like to implement it with codeIgniter
try with '0123456789123456' as an ANDROID_DEVICEID
define('GOOGLE_EMAIL','someone#gmail.com');
define('GOOGLE_PASSWD','SomePassword');
define('ANDROID_DEVICEID','0123456789123456');

Zend_Mail_Storage_Pop3 Send failed

I have created a script using the Zend Framework. The goal is that the script checks the e-mail. When I connect to a pop3 account that isn't on the same domain as the webhosting (f.ex hosting is on arkreport.be and the e-mail is info#my-domain.com), it works. But when I connect to a mail account on the same hostingaccount, it wouldn't work.
Could this be a server problem? My webhosts asks me more information about the way I connect, but i can't give them more than a short explanation of all used codes.
Is there an alternative perhaps. The emailuseraccount has a % in it, perhaps that is a problem... I don't know :)
This is the error
Fatal error: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'read failed - connection closed?' in /var/www/html/library/Zend/Mail/Protocol/Pop3.php:174 Stack trace: #0 /var/www/html/library/Zend/Mail/Protocol/Pop3.php(222): Zend_Mail_Protocol_Pop3->readResponse(false) #1 /var/www/html/library/Zend/Mail/Protocol/Pop3.php(282): Zend_Mail_Protocol_Pop3->request('PASS passw') #2 /var/www/html/library/Zend/Mail/Storage/Pop3.php(191): Zend_Mail_Protocol_Pop3->login('facturen%arkrep...', 'oj1rak') #3 /var/www/html/application/default/controllers/CronController.php(76): Zend_Mail_Storage_Pop3->__construct(Array) #4 /var/www/html/library/Zend/Controller/Action.php(513): CronController->checkmailAction() #5 /var/www/html/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('checkmailAction') #6 /var/www/html/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 /var/www/h in /var/www/html/library/Zend/Mail/Protocol/Pop3.php on line 174
Your host is probably rejecting the bad character "%".
Make a new username without special characters like "%" use only letters.

Categories