我正在尝试使用mail()带有pdf附件的php中的函数发送电子邮件.我在localmachine上运行脚本.我设置了smtp ip in php.ini.我可以完美地发送文本邮件,但附件附件我收到以下错误:
Warning: mail() [function.mail]: SMTP server response: 503 Unexpected command or sequence of commands in C:\AppServ\www\PhpProject1\CV-Generator\testemail2.php on line 55
有人能告诉我什么是错的吗?
这是我的代码:
<?php
// download fpdf class (http://fpdf.org)
require('./pdf/fpdf.php');
// fpdf object
$pdf = new FPDF();
// generate a simple PDF (for more info, see http://fpdf.org/en/tutorial/)
$pdf->AddPage();
$pdf->SetFont("Arial","B",14);
$pdf->Cell(40,10, "this is a pdf example");
// email stuff (change data below)
$to = $_GET['send'];
$from = "info@asaltechd.com";
$subject = "send email with pdf attachment";
$message = …Run Code Online (Sandbox Code Playgroud)