这是我的邮件脚本,试图从我的服务器发送邮件。
<?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 服务器中运行此脚本时,我收到致命错误:致命错误:调用 /home/content/99/7916299/html/EMRXXX/EMRnew/Patient/sendmail1.php 中的未定义函数 sendMail()第 13 行
提前谢谢你,拉姆塞