Created
June 17, 2010 13:08
-
-
Save reu/442083 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function sendEmailViaWebService($email) { | |
$soapClient = new soapclient("http://www.paulinia.sp.gov.br/email/sendmail.asmx?WSDL", "wsdl"); | |
$request = "<Send xmlns='http://tempuri.org/'> | |
<De>{$email['from']}</De> | |
<Para>{$email['to']}</Para> | |
<Assunto>{$email['subject']}</Assunto> | |
<Mensagem>{$email['message']}</Mensagem> | |
</Send>"; | |
return $soapclient->call("Send", array($request)); | |
} | |
sendEmailViaWebService(array("from" => "lol@wut.com", | |
"to" => "wut@lol.com", | |
"subject" => "Teste", | |
"message" => "rofling")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment