Skip to content

Instantly share code, notes, and snippets.

@reu
Created June 17, 2010 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reu/442083 to your computer and use it in GitHub Desktop.
Save reu/442083 to your computer and use it in GitHub Desktop.
<?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