问题
I went through product library and found that there is a method called xdmp:email($node)
which can send email only using a thing called smtp
relay(?) which does NOT
require any authentication. How can I send email using my email for example with following configuration:
outgoing smtp server: smtp.gmail.com
smtp port: 465
username: username@gmail.com
password: ****
Use secure connection: true.
This set of parameters are common when we automate the 'send email
' process. Now, in marklogic, we have a method named xdmp:email
which doesnot provide any place to specify these parameters. So how can we send email in marklogic ?
回答1:
Set up a local smtp relay that only listens to local connections and does not require a login, but acts as an authentication relay for a smarter host. In your example the smarter host might be google.
For example if you want to use postfix as your authentication relay, you might be able to follow the instructions at http://www.postfix.org/SOHO_README.html under "Enabling SASL authentication in the Postfix SMTP/LMTP client".
来源:https://stackoverflow.com/questions/14826908/sending-email-using-marklogic-and-xdmp