简体   繁体   English

PEAR :: Mail与PHP:Mail

[英]PEAR::Mail vs. PHP: Mail

I am creating a PHP system that will forward emails, (ie. someone@emailforprofession.com to someone@gmail.com) without using an SMTP server which is faster and more stable? 我正在创建一个PHP系统,该系统无需使用更快,更稳定的SMTP服务器就可以转发电子邮件(例如,someone@emailforprofession.com到someone@gmail.com)? PEAR::Mail or PHP: Mail? PEAR :: Mail或PHP:Mail? (or another one entirely) (或完全是另一个)

I would be using extra headers and attachments but mainly trying to keep it looking and acting the same. 我将使用额外的标题和附件,但主要是尝试使其外观和行为保持一致。 (if anyone has an example for forwarding with attachments PLEASE provide it!) (如果有人有转发附件的示例,请提供它!)

And not exactly on the side but is there a way for people to be able to send email from they're someone@emailforprofession.com email address without having a complete inbox etc? 并非完全在一边,但是人们有没有办法在没有完整收件箱等的情况下从他们的person-emailforprofession.com电子邮件地址发送电子邮件?

It would probably be better for me to use a real email provider but these are supposed to be free email addresses so paying by the email address is not an option, if anyone knows of a service that: charges by the month or year, has an API that email addresses can be created from and that can set up email forwards via the API that would be most appreciated. 使用真正的电子邮件提供商对我来说可能会更好,但是这些应该是免费的电子邮件地址,因此,如果有人知道某项服务按月或年收费,则可以选择不使用电子邮件地址付款可以从中创建电子邮件地址并可以通过该API设置电子邮件转发的API,这一点将是万分感谢。

I currently have a partial system together but would like to know which way I should go first. 我目前有一个部分系统,但想知道我应该先走哪条路。

Thank you all. 谢谢你们。

The PEAR class supports multiple mailer backends, which allows you to switch whenever needed and you'll be able to perform some benchmarks and see which backend suits you best. PEAR类支持多个邮件程序后端,这使您可以在需要时进行切换,并且可以执行一些基准测试,并查看最适合您的后端。 The native mail function on the other hand is much less advanced and will show a clear difference in performance, especially for that amount of mails. 另一方面,本机邮件功能的高级程度要低得多,并且在性能上会显示出明显的差异,尤其是对于一定数量的邮件。

I also suggest you have a look at PEAR's mail queue class: http://pear.php.net/package/Mail_Queue 我还建议您看看PEAR的邮件队列类: http : //pear.php.net/package/Mail_Queue

This is much more recommended for larger projects such as yours, you'll also be able to implement a cron like feature which will send a certain amount of mail per period you choose. 对于较大的项目(例如您的项目),更推荐这样做,您还可以实现cron like功能,该功能将在您选择的每个周期发送一定数量的邮件。

Here 这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM