これは、サーバーからメールを送信しようとするメール スクリプトです。
<?php
$subject = 'This is an HTML email.';
$smtp_server = 'smtp.mydomain.com';
$from = $smtp_username = 'info@mydomail.com';
$smtp_password = 'mypassword';
$html = 'This is an <strong>HTML</strong> <i>formatted</i> email!';
$text = strip_tags($html);
$to = 'ramsai.php@gmail.com';
//$cc = array('foo@example.com');
//$bcc array('bar@example.com', 'baz@example.com');
// 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 サーバーでこのスクリプトを実行しようとすると、致命的なエラーが発生します: Fatal error: Call to undefined function sendMail() in /home/content/99/7916299/html/EMRXXX/EMRnew/Patient/sendmail1.php on 13行目
前もってありがとう、ラムサイ