MailTransport class to send emails over Euromsg webservices.
in your app/Config/email.php file
public $euromsg = array(
'from' => array('[email protected]' => 'Example Site'),
'FromName' => 'Example Site',
'FromAddress' => '[email protected]',
'ReplyAddress' => '[email protected]',
'url' => 'http://ws.euromsg.com/ecomm/',
'username' => 'euromsg_username',
'password' => 'euromsg_password',
'transport' => 'Euromsg'
);
in any of your controller or shell
App::uses('CakeEmail', 'Network/Email');
$Email = new CakeEmail('euromsg');
$Email->to('[email protected]');
$Email->template('default', 'default');
$Email->emailFormat('html');
$Email->subject('Test Subject');
$Email->send("Lets test drive this puppy");
This example uses default email layout and default email view template in CakePHP.
According to euromsg api, you must
- use html in your messages, which means your mail body must contain
<html><body> MESSAGE </body></html>
- In your config, FromName and FromAddress variables must be same as in your euromsg admin panel.