public function report() { $user = Session::get('user'); $data = array('user' => $user['data']->email, 'description' => Input::get('description'), 'type' => Input::get('type'), 'url' => Input::get('url')); ob_start(); var_dump($data); $data = ob_get_clean(); try { $uService = new SoapClient(Config::get('wsdl.utility'), array()); $result = $uService->sendEmail(array("text" => $data)); return array('success' => true); } catch (Exception $ex) { throw new Exception($ex->getMessage()); } }
function sendMail($message) { ini_set("soap.wsdl_cache", "0"); ini_set("soap.wsdl_cache_enabled", "0"); $wsdl = "http://safeguardtracking.no-ip.org:8080/NotificationsService/NotificationsServiceImp?wsdl"; $soapclient_options = array(); $soapclient_options["verify_peer"] = false; $soapclient_options["verify_host"] = false; $soapclient_options["allow_self_signed"] = true; //var_dump($token); try { $client = new SoapClient($wsdl, $soapclient_options); } catch (SoapFault $e) { return 'Caught exception: ' . $e->getMessage() . "\n"; } $params = array("sourceEmail" => "*****@*****.**", "sourcePassword" => "appsafeguard", "destinationEmail" => "*****@*****.**", "subject" => "[CONTACT]", "body" => $message); try { return $client->sendEmail($params); } catch (Exception $e) { return 'Caught exception: ' . $e->getMessage() . "\n"; } return NULL; }