<?php ## testing the sendMailDirect function # print function sendMailDirect($email, $subject, $message) { class sendmaildirect extends phplistTest { public $name = 'sendMailDirect'; public $purpose = 'SMTP delivery of request for confirmation'; function runtest() { ## for this test to work, we should not use the developer_email unset($GLOBALS["developer_email"]); print "<br/>Should be successful: "; ## this one should succeed $ok = sendMailDirect('info@phplist.com','Test','Test sending'); if ($ok) { print $GLOBALS['img_tick']; } else { print $GLOBALS['img_cross']; } ## and this one fail print "<br/>Should fail: "; $fail = sendMailDirect('phplist.admin.invalidemail@gmail.com','Test','Test sending'); if (!$fail) { print $GLOBALS['smtpError']; print $GLOBALS['img_tick']; } else { print $GLOBALS['img_cross']; } return $ok && !$fail; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
cleanListname.php | File | 2.21 KB | 0644 |
|
cleanUrl.php | File | 3.21 KB | 0644 |
|
dummy.php | File | 169 B | 0644 |
|
parseplaceholders.php | File | 3.38 KB | 0644 |
|
sendmaildirect.php | File | 980 B | 0644 |
|
sendpage.php | File | 1.75 KB | 0644 |
|
subscriber_password.php | File | 1.93 KB | 0644 |
|
test_is_email.php | File | 5.07 KB | 0644 |
|
translation.php | File | 1.34 KB | 0644 |
|