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.
我正在尝试通过 ajax 调用发送 PHP 邮件,但我无法获取附件。
$.ajax({ url: 'php_sendmail_upload2.php', data: data, processData: false, type: 'POST', success: function ( data ) { alert( data ); } });
有没有办法使用 ajax 发送带有附件的邮件?
使用 phpmailer (http://www.web-development-blog.com/archives/send-e-mail-messages-via-smtp-with-phpmailer-and-gmail/)。让您的 ajax 函数提交到使用 PHP 邮件程序的 php 页面,发送附件将很容易。