REDROOM
PHP 8.1.33
Path:
Logout
Edit File
Size: 1.87 KB
Close
/home/jambtst2015/public_html/protected/extensions/yii-multimailer/Examples/default-smtp.php
Text
Base64
<?php /** * @author Pawel Bizley Brzozowski * @version 1.0 * * MultiMailer default SMTP implementation * This sets SMTP method with minimum options. */ /** * ----------------------------------------------------------------------------- * Configuration: * <Yii directory>/protected/config/main.php * ----------------------------------------------------------------------------- */ return array( // ... 'components' => array( // ... 'MultiMailer' => array( 'class' => 'ext.MultiMailer.MultiMailer', 'setFromAddress' => 'example@example.com', 'setFromName' => 'Example', 'setMethod' => 'SMTP', 'setOptions' => array( 'Host' => 'smtp.example.com', 'Username' => 'smtpusername@example.com', 'Password' => 'smtppassword', ), ), // ... ), // ... ); /** * ----------------------------------------------------------------------------- * Usage: * ----------------------------------------------------------------------------- */ class ExampleController extends Controller { public function actionIndex() { $recipientEmail = 'recipient@example.com'; $recipientName = 'Example Name'; $emailSubject = 'Example email subject'; $emailBody = '<h1>Hello</h1><p>This is test.<br>MultiMailer test.</p>'; $mailer = Yii::app()->MultiMailer->to($recipientEmail, $recipientName); $mailer->subject($emailSubject); $mailer->body($emailBody); if ($mailer->send()) { $result = 'Test email has been sent successfully.'; } else { $result = 'Test email sending error!<br>' . $mailer->getMultiError(); } $this->render('index', array('result' => $result)); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
all-default-options.php
1.65 KB
lrw-r--r--
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
default-db.php
2.92 KB
lrw-r--r--
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
default-mail.php
1.63 KB
lrw-r--r--
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
default-smtp.php
1.87 KB
lrw-r--r--
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mail-with-template.php
2.13 KB
lrw-r--r--
2024-11-22 17:53:11
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).