简体   繁体   English

中庭通知邮件

[英]Notification mail in open atrium

I have a problem on how to send mail on notification while editing or creating any contents in open atrium. 我在编辑或在开放式中庭中创建任何内容时如何发送通知邮件。

I have followed as mentioned in below link https://community.openatrium.com/documentation-en/node/28 我按照下面的链接https://community.openatrium.com/documentation-zh/node/28所述

but was not successful in sending mail to notified user on creating or editing of contents. 但未能成功将有关创建或编辑内容的邮件发送给通知的用户。

And also i wanted to send a mail to user when his credentials is changed or edited. 而且我还想在用户凭据更改或编辑时向用户发送邮件。

May can anyone help me in rectifying this issues. 谁能帮助我纠正此问题。

Is your server/PHP enabled to send mails? 您的服务器/ PHP是否可以发送邮件?

Maybe that is not the case and this is why no messages are sent. 也许不是这样,这就是为什么没有消息发送的原因。

In any way you can do a couple of tests to check that out what is wrong. 您可以通过任何方式进行一些测试,以检查出什么地方出了问题。 For some, you will need the devel module installed: 对于某些情况,您将需要安装devel模块

  • Check if your server has the SMTP functionality installed and running (how to check this changes a lot from server to server) 检查您的服务器是否已安装并正在运行SMTP功能(如何检查这在服务器之间的变化很大)
  • Check if your PHP installation manages to send mail. 检查您的PHP安装是否成功发送邮件。 There are plenty of available scripts to do this on the internet. 互联网上有很多可用的脚本可以执行此操作。 I C&P one below. 我在下面的C&P中。
  • Check if you can send mails with drupal (with the develop module installed, visit http://example.com/devel/php and use the drupal_mail() function. 检查是否可以使用drupal发送邮件(安装了开发模块,请访问http://example.com/devel/php并使用drupal_mail()函数。
  • Change the setting from the devel module and put the mail to "log only": this will show you if Open Atrium is at least trying to send them. 从devel模块中更改设置,并将邮件置于“仅日志”状态:这将向您显示Open Atrium是否至少尝试发送它们。

Example PHP script to test mail functionality. 用于测试邮件功能的示例PHP脚本。

$to = "recipient@example.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
  echo("<p>Message successfully sent!</p>");
} 
else {
  echo("<p>Message delivery failed...</p>");
}
?>

HTH! HTH!

According to the OpenAtrium Installation docs , all you need to do is enable the [standard Drupal cron job]. 根据OpenAtrium安装文档 ,您需要做的就是启用[标准Drupal cron作业]。 That worked for me in my OpenAtrium installation. 这对我的OpenAtrium安装很有用。 Just to be clear, I did not have to alter php.ini or install the Drupal SMTP module. 为了清楚起见,我不必更改php.ini或安装Drupal SMTP模块。

Documentation is not realistic. 文档是不现实的。 Take a look to this post: https://community.openatrium.com/issues/node/79 看一下这篇文章: https : //community.openatrium.com/issues/node/79

Fixed installing smtp module and letting openatrium mail with PHPMailer. 修复了安装smtp模块并使用PHPMailer允许openatrium邮件的问题。

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

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