如何自动发送预定的电子邮件. [英] How to send scheduled email automatically.

查看:87
本文介绍了如何自动发送预定的电子邮件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过一些在计划的电子邮件中提到Cron的论坛.但是我看不到示例或代码.我只是担心每周定期发送预定的电子邮件(不单击任何内容).发送大量电子邮件的工作量将排在第二位,而不是我的优先级.[仅提及这一点,以便在有答案的情况下,第二位不会被提及.]

我更多地使用台式机应用程序,因此我对Web App的了解不深....

谁能指导我通过这一点.就像(1)我需要编写脚本-我应该在脚本上写什么内容,以及(2)如果我需要将脚本与Cron相关联-我应该如何写脚本,请详细说明.如果您有验证码,请分享.

而且要提到的是,我正在Windows XP Pro SP2下开发,XAMPP for PHP.

I have read forums that mention Cron in (scheduled email). But I was not able to see an example or code. I am just worrying scheduled emails periodically every week (w/o clicking anything). The load of sending many emails would be second and less of my priority.[Just mentioning this so that if there are answers, the second will not be mentioned]

I am more on desktop applications, so I really don''t have strong background with Web App....

Can anyone guide me through this. Like if (1)I need to write a script - how and what should I write on it, (2)If I need to associate the script to Cron - how should I do that.Please be elaborate. And if you have codes, please share.

And to mention, I am developing under Windows XP Pro SP2, XAMPP for PHP.
Thanks.

推荐答案

您可以编写一个自定义脚本,该脚本将发送带有必要内容的邮件并将其添加到调度程序中.

为此,您需要做的就是创建一个新的计划任务,并在任务启动时执行以下操作.

You can write a custom script that would send the mail with contents necessary and add it to scheduler.

All you need to do for that is create a new scheduled task and perform the below when the task is initiated.

C:\Xampp\php\php.exe -f C:\Xampp\htdocs\my_script.php 



但是在编写PHP脚本时,您需要小心.

您能告诉我们您想在邮件中包含哪些内容吗?

BR//
Harsha



But while writing the PHP script you need to be careful.

Can you tell us what contents you want to include in that mail ?

BR//
Harsha


这篇关于如何自动发送预定的电子邮件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆