$modx->getService('mail', 'mail.modSwiftMailer'); $modx->mail->address('to', '[email protected]', 'Recipient'); $modx->mail->address('sender', '[email protected]'); $modx->mail->subject('A simple e-mail'); $modx->mail->body('<h1>Simple e-mail</h1><p>With a basic message</p>'); $modx->mail->send();
// mail confirmation $to = $email; $subject = 'My Subject'; $modx->getService('mail', 'mail.modSwiftMailer'); $modx->mail->address('to', $to, 'Recipient'); $modx->mail->address('sender', $from); $modx->mail->address('from', $from, $fromName); $modx->mail->subject($subject); $modx->mail->body($message); $modx->mail->address('reply-to',$from,'Sender'); $modx->mail->send();
$this->modx->mail->plugin('throttler', array( 'active' => false, 'rate' => 20, 'mode' => 'messages' // toggle 'bytes' for Bytes ;) Do yehr own calculation ));
[2012-08-22 12:50:24] (ERROR @ /index.php) modSwiftMailer is missing a Return-Path
$modx->mail->address('from', '[email protected]', 'Graphical sender');
$modx->mail->address('sender', '[email protected]');