PHP code example of xsuchy09 / nette-eml-response

1. Go to this page and download the library: Download xsuchy09/nette-eml-response library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xsuchy09 / nette-eml-response example snippets


class SomePresenter extends BasePresenter
{
	public function actionDefault()
	{
		$emlData = file_get_contents('mail.eml');

		$response = new \xsuchy09\Application\Responses\EmlResponse($emlData, 'download.eml');
		$this->sendResponse($response);
	}
}