Skip to content

Instantly share code, notes, and snippets.

@ekandreas
Created April 23, 2015 10:25
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 ekandreas/011e67faaca022606617 to your computer and use it in GitHub Desktop.
Save ekandreas/011e67faaca022606617 to your computer and use it in GitHub Desktop.
Enkelt anrop Epostservice för att skapa nyhetsbrev via API i PHP
$sender = new \EpostserviceAddress();
$sender->email = "andreas.ek@skolporten.com";
$sender->name = "Andreas Ek";
$sender->userId = 67018485;
$sender->created = date("c", time());
$document = new \EpostserviceDocument();
$document->changed = date("c", time());
$document->created = date("c", time());
$document->isemail = true;
$document->name = 'TEST via API';
$document->senderAddress = $sender;
$document->subject = "Test via API";
$document->templateId = 13861;
$this->ep->DocumentCreate( $document );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment