Hello Magnolia community,

I am newbie with this great cms, jsp's and web development;), but for
my web site, that i would like to build with Magnolia, i need one
"nice feature". For that, i have two-three questions...

1.) Is it possible to use Gmail as SMTP Server with Magnolia Community
Edition? If yes, how?
I had tryed to configure that in mail/config/smtp with smtp.gmail.com
as the server, 465 as a port an with my account-data, but it is not
working...

2.) I would like have a bug report feature on my site, that allows to
my visitors send me a little bug report. For that I have created a
html form, that is hard coded in my template.jsp:

<div id="fehlermeldung">
      <a onclick="$('#fehlermeldung_form').toggle('slow');return
false;" href="#">Ein Fehler gefunden?</a>
      <div id="fehlermeldung_form">
        <h3>
          Fehlertext:
        </h3>
        <form action="." method="post">
          <fieldset>
                <jsp:text>
                <![CDATA[
              <div >
              <input value="true" name="sendmail" type="hidden"/>
              <div class="text_holder">
                <textarea class="js-field-data js-required text" name="bug"
                rows="5" cols="20"></textarea>
              </div>
            </div>
            <input type="submit" value="Absenden" />
            <input type="button" value="Abbrechen" class="button f_right" style=
            "margin-right:10px" onclick=
            "$('#fehlermeldung_form').toggle('slow');return false;" />
                ]]>
                </jsp:text>
          </fieldset>
        </form>
      </div>
    </div>

on the top of my template.jsp i have placed following code (in
according to sample-form.jsp):

<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page";
xmlns:cms="cms-taglib"
  xmlns:cmsu="cms-util-taglib" xmlns:c="http://java.sun.com/jsp/jstl/core";
  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt";
xmlns:mailer="urn:jsptld:taglibs-mailer">
  <jsp:directive.page contentType="text/html; charset=UTF-8" session="false" />
  <c:if test="${!empty(param.sendmail)}">
    <mailer:mail server="smtp.gmail.com:465"
                 authenticate="true"
                 user="[EMAIL PROTECTED]"
                 password="myPasswort"
                 from="[EMAIL PROTECTED]"
                 to="[EMAIL PROTECTED]"
                 subject="Test-E-Mail ueber taglibs-mailer">
                 <mailer:message>${param.bug}</mailer:message>
                 <mailer:send>An error has occurred, please back up
and check that the
       addresses you gave are in the correct format.</mailer:send>
           </mailer:mail>
  </c:if>


here I'm using jakarta's mailer taglib to sending a email, because
cmsu:simpleMailer does need "nodeContents" as message body, that i not
have here...
This works not, because:
Caused by: java.net.ConnectException: Connection timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
        ... 110 more

Supposed, it would works, my actual site is completely reloaded, how i
can send this email AJAX-like without reloading/redirecting? Do I need
an extra servlet/jsp-template?
Have someone expirience with that issue?

I hope, it was not too much questions:)

Best regards,

Nikolai

----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------

Reply via email to