我正在创建一个允许上传多个文件的表单。表单字段值和附件随后将通过电子邮件发送到特定地址。我正在使用Swiftmailer生成这些电子邮件。我知道如何使用Swiftmailer附加一个文件,但我不知道如何附加多个文件。有没有人知道使用Swiftmailer能否做到这一点?
发布于 2011-05-25 08:52:02
是的,这只是对attach()进行多次调用的问题
$message->attach(Swift_Attachment::fromPath('../../uploads/hocuradit/' . $attPath . $attA));
$message->attach(Swift_Attachment::fromPath('../../uploads/hocuradit/' . $attPath . $attB)); 来源:http://groups.google.com/group/swiftmailer/browse_thread/thread/416b287591dfe931?fwc=1
https://stackoverflow.com/questions/6118428
复制相似问题