Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想做这个:
$mail = new PHPMailer; $mail->AddAttachment('text in file', 'file.txt');
所以附件可以有动态内容。我现在只能使用真实文件作为附件。显然,真实文件是静态的,我想动态生成一些内容并将其附加到邮件中。必须有某种方法可以做到这一点,我想这不是那个晦涩的功能。有人知道怎么做吗?
$mail->AddStringAttachment($string,$filename,$encoding,$type);
http://phpmailer.worxware.com/?pg=tutorial#3