如何使用PHP发送莲花笔记本电子邮件 [英] How to send email in lotus notes using PHP
问题描述
需要通过Lotus Notes发送电子邮件。 Notes在我的系统上配置。所以只要我可以使用PHP发送电子邮件。有人可以帮助我应该做的代码和配置吗?
Need to send email using PHP via lotus notes. Notes is configured on my system. So just wanted if I could send email using PHP. Can anybody help with the code and configuration that I am supposed to do?
在阅读了所有人的回复后,我试图把事情从我的结束。我可以帮助你,至少提前一步。我可以使用GetEnvironmentString找出我的邮件服务器,并且它的错误正确,也体现在我的Lotus Notes工作空间中。但是当我试图使用下面的代码,它只是继续加载,最终没有返回 -
After reading replies from all of you, I tried to nail down things from my end. I could at least move one step ahead with all your help. I could figure out my mail server using GetEnvironmentString and its damn correct as also reflected in my lotus notes work space. But when I am trying to use the below code it just keeps on loading and finally returning nothing -
<?php
require_once "Mail.php";
$from = "abc@email.com";
$to = "abc@email.com";
$subject = "Test!";
$body = "Hi,\n\nTest?";
$host = "d23abcd";
$port = "1352";
$username = "abc@email.com";
$password = "mypassword";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
我在这里犯了一些错误?我怀疑
Am I committing some mistake here? I doubt
$host = "d23abcd";
$port = "1352";
推荐答案
如果您的Lotus Domino服务器设置了SMTP,可以使用Domino服务器作为传出邮件服务器(如果PHP能够使用中继服务器发送邮件)。
If your Lotus Domino server has SMTP set up, you can use the Domino server as outgoing mail server (if PHP is able to send mail using a relay server).
这篇关于如何使用PHP发送莲花笔记本电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!