това е моят пощенски скрипт, който се опитва да изпрати поща от моя сървър.
<?php
$subject = 'This is an HTML email.';
$smtp_server = 'smtp.mydomain.com';
$from = $smtp_username = '[email protected]';
$smtp_password = 'mypassword';
$html = 'This is an <strong>HTML</strong> <i>formatted</i> email!';
$text = strip_tags($html);
$to = '[email protected]';
//$cc = array('[email protected]');
//$bcc array('[email protected]', '[email protected]');
// send the message
$result = sendMail($subject, $smtp_server, $smtp_username, $smtp_password, $html, $text, $to);
// check to see if the message was sent properly
if ($result !== true) {
echo 'There was an error sending the message. ('.$result.')';
} // end if the message was not sent properly
else {
echo 'Message sent successfully.';
} // end else the message was sent properly
?>
Когато се опитвам да стартирам този скрипт в моя godaddy сървър, получавам фатална грешка: Фатална грешка: Извикване на недефинирана функция sendMail() в /home/content/99/7916299/html/EMRXXX/EMRnew/Patient/sendmail1.php на ред 13
Благодаря ти предварително, Рамзай