Iam trying to use an email module in exist-db. For this purpose Iam using mail-send-email function describing in this article http://en.wikibooks.org/wiki/XQuery/Sending_E-mail
but its not working and I dont know why. The exide IDE show the following error: exerr:ERROR Could not send message(s)java.net.UnknownHostException: smtp.google.com [at line 29, column 6]
xquery version "1.0";
declare namespace mail="http://exist-db.org/xquery/mail";
declare variable $message {
<mail>
<from>some name of recipient <[email protected]></from>
<to>[email protected]</to>
<subject>Hello world</subject>
<message>
<text>Hello world!</text>
</message>
</mail>
};
if ( mail:send-email($message, 'smtp.google.com', ()) ) then
<h1>Sent Message OK :-)</h1>
else
<h1>Could not Send Message :-(</h1>
If somebody know how to send email via exist-db I would be very thankful. Thanks in advance!