tuxone / postmark-bundle
postmark bundle
Installs: 63
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 12
Type:symfony-bundle
Requires
- php: >=5.3.2
- kriswallsmith/buzz: >=0.9
- symfony/framework-bundle: 2.*
README
Symfony2 bundle forked from https://github.com/miguel250/PostmarkBundle
Addons
Fake Attachment Attach fake text files
/** * Add fake attachment * * @param string $file * @param string $filename null * @param string $mimeType null * @return Message */ public function addFakeAttachment($file, $filename, $mimeType) { $this->attachments[] = array( 'Name' => $filename, 'Content' => base64_encode($file), 'ContentType' => $mimeType ); return $this; }
Usage
Message Service
<?php $message = $this->get('postmark.message'); $message->addTo('test@gmail.com', 'Test Test'); $message->setSubject('subject'); $message->setHTMLMessage('<b>email body</b>'); $message->addFakeAttachment('Hello world', 'filename.txt', 'text/plain'); $response = $message->send(); ?>