html文件打开后是from,发送带有midi文件的HTML电子邮件,该文件需要在打开时自动播放...

我正在尝试完成以下操作,我正在使用PHP Mailer发送HTML电子邮件,该文件读取html文件并在HTML文件中嵌入midi文件,然后发送电子邮件,然后midi文件应自动开始播放一旦打开电子邮件,这是可能的,因为它似乎不起作用,我正在使用Evolution来查看电子邮件.

我的代码看起来像这样,

HTML文件"如果我在浏览器中打开它,它会播放但不会在电子邮件中播放"

Template

Song is playing

PHP邮件代码

$email = $_GET['email'];

//Including the PHP mailer class

require_once 'class.phpmailer.php';

$mail = new PHPMailer(true); //defaults to using php "mail()"; the true param means it will throw exceptions on errors, which we need to catch

try {

$mail->AddAddress($email);

$mail->SetFrom('webmaster@mydomain.co.za', 'Webmaster');

$mail->AddReplyTo('webmaster@mydomain.co.za', 'Webmaster');

$mail->Subject = 'PHPMailer Test Subject via mail(), advanced';

$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically

$mail->MsgHTML(file_get_contents('template.html'));

$mail->Send();

echo "Message Sent OK

\n";

}catch (phpmailerException $e) {

echo $e->errorMessage(); //Pretty error messages from PHPMailer

} catch (Exception $e) {

echo $e->getMessage(); //Boring error messages from anything else!

}

?>

这是可能吗?如何?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值