Setting up Mail Session on Tomcat 5.5

I'm trying to set a MailSession trought Tomcat JNDI service. Actually i use Sun Web Server for production. I can put some attributes to the MailSession in SunAS, like store.protocol, user.password, and provider (obviously Sun!!)), but when i try it on Tomcat 5.5 i can't put these parameters, and application throws an exception.
i'm setting up my mail session as follows
    <Resource name="mail/sedna"
              auth="Container"
              type="javax.mail.Session"
              mail.smtp.host="myhost"
              mail.smtp.auth="true"
              mail.smtp.user="myuser"
              mail.smtp.password="mypassword" // Can i do this ?
              mail.from="myuser@myhost
              mail.smtp.class="com.sun.mail.smtp.SMTPTransport" />I put the mail.jar, and activation.jar into the Tomcat's classpath, but i get these error
javax.mail.NoSuchProviderException: No provider for Address type: rfc822
     at javax.mail.Session.getTransport(Session.java:516)
     at javax.mail.Transport.send0(Transport.java:155)
     at javax.mail.Transport.send(Transport.java:81)
....THX

The documentation for JNDI resource on the Tomcat 5.5 website isn't complete, or at least it doesn't show you how to setup a mail session using smtp authentication.
context.xml file:
<Resource name="mail/Session" auth="Container" type="javax.mail.Session" mail.smtp.host="mailhost" mail.smtp.auth="true" mail.smtp.user="myUsername" password="myPassword" mail.from="[email protected]"/>
web.xml file:
     <resource-ref>
          <description>Resource reference to a factory for javax.mail.Session instances that may be used for sending electronic mail messages, preconfigured to connect to the appropriate SMTP server.</description>
          <res-ref-name>mail/Session</res-ref-name>
          <res-type>javax.mail.Session</res-type>
          <res-auth>Container</res-auth>
     </resource-ref>
Finally, Your code should look like this...
          Context initCtx = new InitialContext();
          Context envCtx = (Context) initCtx.lookup("java:comp/env");
          Session session = (Session) envCtx.lookup("mail/Session");
          MimeMessage message = new MimeMessage( session );
I hope this helps someone.
Peace-
Russ

Similar Messages

  • How do i configure mail session in Weblogic 8.1

    Hi all,
    I am having dead end here,
    I have tried to configure a mail session in weblogic 8.1
    I have created a mail service (service/mail) in weblogic console, with the JNDI named mail/MailFolderClientSession.
    and properties like this :
    mail.store.protocol=pop3
    mail.user=test@wiyanto
    mail.transport.protocol=smtp
    mail.smtp.host=11.2.145.64
    mail.debug=true
    mail.from=test@wiyanto
    mail.host=11.2.145.64
    mail.smtp.auth=false
    mail.smtp.user=test@wiyanto
    mail.pop3.host=11.2.145.64
    wiyanto is my computer name
    11.2.145.64 is my IP address
    and I used Imail as my mail server
    in the weblogic-ejb-jar.xml i have added this :
    <weblogic-enterprise-bean>
         <ejb-name>Email</ejb-name>
         <reference-descriptor>
              <resource-description>
                   <res-ref-name>EmailSession</res-ref-name>
                   <jndi-name>mail/MailFolderClientSession</jndi-name>
              </resource-description>
         </reference-descriptor>
         <jndi-name>ejb/EmailHome</jndi-name>
    </weblogic-enterprise-bean>
    and I have set the mail session to run automatically when i start the weblogic server.
    but i still encounter this :
    MailFolderClient: MessagingException in connectToMailStore [javax.mail.AuthenticationFailedException]
    MailFolderClient: login: Connection to mailstore failed
    Please tell me what is wrong with this, b'cause I met dead end on every search on google :(
    Any suggestion is more than welcome.

    To join the domain, you can follow these steps:
    1.Open System by swiping in from the right edge of the screen, tapping Search (or if you're using a mouse, pointing to the upper-right corner of the screen, moving the mouse pointer down, and then clicking Search), entering System in the search box, and
    tapping or clicking System.
    2.Under Computer name, domain, and workgroup settings, click Change settings. Administrator permission required You might be asked for an admin password or to confirm your choice.
    3.Click Network ID and follow the steps on your screen.
    Alex Zhao
    TechNet Community Support

  • Mail/Session configuration problem. please help me

    am using tomcat 4.1
    in my server.xml file gave the following lines
    <Resource name="mail/Session" auth="Container" type="javax.mail.Session" />
    <ResourceParams name="mail/Session">
    <parameter>
    <name>mail.smtp.host</name>
    <value>hostName</value>
    </parameter>
                   <parameter>
    <name>mail.transport.protocol</name>
    <value>smtp</value>
    </parameter>
                   <parameter>
    <name>mail.smtp.auth</name>
    <value>true</value>
    </parameter>
                   <parameter>
    <name>mail.smtp.username</name>
    <value>username</value>
    </parameter>
                   <parameter>
    <name>mail.smtp.password</name>
    <value>password</value>
    </parameter>
    </ResourceParams>
    but i am getting an error like this
    ENCOUNTERED EXCEPTION: javax.mail.SendFailedException: Sending failed; nested exception is: javax.mail.AuthenticationFailedException
    how can i over come this situation ?
    i got a lot of code but that does'nt have authentication information
    please help me

    You will have to be more specific for anyone to help you. Has this happened only recently or right after you set up the account? Are you using POP or IMAP.

  • Sending email using BPEL 11g and Mail Sessions

    Hi gurus,
    I have created a BPEL process which can emails to a set of people. The mail server, port etc are configured in EM Console --> user messaging service-email --> Email Driver Properties. I then added the 'from address' in soa infra --> workflow config.
    My question is - is there any way in which I can achieve the same using Mail Sessions (Weblogic Console --> Mail Sessions)?
    Regards,
    Arindam

    I ran accross this randomly so sorry if this is irrelevent with timing. It seems however that Text Expander might be what you need. It is a mac program though, not ios.
    http://www.smilesoftware.com/TextExpander/

  • Best practice for keeping a mail session open in web application?

    Hello,
    We have a webmail like application where users login with their IMAP credentials, then are taken to an authenticated area of the site where they can manage different things about their email account.
    Right now the application is opening and closing a mail store connection (via a new javax.mail.Session) for each page load based on the current logged in user credentials. To me this seems like it would be a bad practice to keep opening and closing a connection each page load.
    Are there any best practices for this situation? It would be nice to be able to open the connection to the mail server on login, then keep that connection open until the person logs out, session expires, etc.
    I can probably put the javax.mail.Session into the HTTP session, but that seems like it would break any clustering functionality of tomcat. This would be fine if the machine the user is on didn't fail, but id assume if they failed over to another the mail session would be gone. Maybe keeping the mail session in the http session, checking for a connection, then first attempting to reconnect with the logged in credentials before giving up would be a possiblity?
    Any pointers would be appreciated

    If you keep the connection open across pages, you're going to need to deal with
    timeouts - from the http session and from the mail server.
    If you don't keep the connection open, you're going to need to "resynchronize"
    your view of the store/folder with each operation, in case the folder is modified
    by another session.
    The former is easier in the common cases, especially if you don't care how gracefully
    you handle failures. The latter is more difficult in the common cases, but handles
    failure better, and in particular handles clustering better. You'll need to measure it to
    see if it meets your performance and scalability requirements. You may need to mix
    the two approaches to get acceptable performance.

  • Always get the InternetAddress & javax.mail.Session error

    <%@ page import="javax.mail.*" %>
    <%@ page import="javax.mail.internet.*" %>
    <%@ page import="javax.activation.*" %>
    <%@ page import="java.util.*,java.io.*" %>
    <%@ page contentType="text/html;charset=big5" %>
    <html>
    <head>
    <title>JavaMail</title>
    </head>
    <body>
    <h2>&#21033;&#29992;JavaMail&#20358;&#20659;&#36865;&#38651;&#23376;&#37109;&#20214; - &#38468;&#21152;&#27284;&#26696;</h2>
    <%
    InternetAddress[] address = null;
    request.setCharacterEncoding("big5");
    // MultipartRequest multi = new MultipartRequest(request , "." , 5*1024*1024 , "big5");
    String mailserver = "mail.dwu.edu.tw";
    String From = request.getParameter("From");
    String to = request.getParameter("To");
    String Subject = request.getParameter("Subject");
    String type = request.getParameter("Type");
    String messageText = request.getParameter("Message");
    String FileName = request.getParameter("FileName");
    boolean sessionDebug = false;
    try {
    // &#35373;&#23450;&#25152;&#35201;&#29992;&#30340;Mail &#20282;&#26381;&#22120;&#21644;&#25152;&#20351;&#29992;&#30340;&#20659;&#36865;&#21332;&#23450;
    java.util.Properties props = System.getProperties();
    props.put("mail.host",mailserver);
    props.put("mail.transport.protocol","smtp");
    // &#29986;&#29983;&#26032;&#30340;Session &#26381;&#21209;
    javax.mail.Session mailSession = javax.mail.Session.getDefaultInstance(props,null);
    mailSession.setDebug(sessionDebug);
    Message msg = new MimeMessage(mailSession);
    // &#35373;&#23450;&#20659;&#36865;&#37109;&#20214;&#30340;&#30332;&#20449;&#20154;
    msg.setFrom(new InternetAddress(From));
    // &#35373;&#23450;&#20659;&#36865;&#37109;&#20214;&#33267;&#25910;&#20449;&#20154;&#30340;&#20449;&#31665;
    address = InternetAddress.parse(to,false);
    msg.setRecipients(Message.RecipientType.TO, address);
    // &#35373;&#23450;&#20449;&#20013;&#30340;&#20027;&#38988;
    msg.setSubject(Subject);
    // &#35373;&#23450;&#36865;&#20449;&#30340;&#26178;&#38291;
    msg.setSentDate(new Date());
    if (FileName != null)
    File file = new File(FileName);
    // &#22914;&#26524;&#26377;&#38468;&#21152;&#27284;&#26696;&#26178;&#65292;&#20808;&#23559;&#37109;&#20214;&#20839;&#23481;&#37096;&#20221;&#20808;&#23384;&#36215;&#20358;
    MimeBodyPart mbp1 = new MimeBodyPart();
    // &#35373;&#23450;&#37109;&#20214;&#20839;&#23481;&#30340;&#22411;&#24907;&#28858; text/plain &#25110; text/html
    mbp1.setContent(messageText, type + ";charset=big5");
    // &#20877;&#20358;&#23565;&#27284;&#26696;&#20316;&#34389;&#29702;
    MimeBodyPart mbp2 = new MimeBodyPart();
    FileDataSource fds = new FileDataSource(FileName);
    mbp2.setDataHandler(new DataHandler(fds));
    mbp2.setFileName(MimeUtility.encodeText(fds.getName(), "big5", "B"));
    // &#26368;&#24460;&#20877;&#23559;&#20108;&#32773;&#25972;&#21512;&#36215;&#20358;&#65292;&#30070;&#20316;&#19968;&#20221;&#37109;&#20214;&#36865;&#20986;
    Multipart mp = new MimeMultipart();
    mp.addBodyPart(mbp1);
    mp.addBodyPart(mbp2);
    msg.setContent(mp);
    else
    // &#33509;&#27794;&#26377;&#27284;&#26696;&#26178;&#65292;&#23601;&#30452;&#25509;&#23384;&#37109;&#20214;&#20839;&#23481;
    msg.setContent(messageText,type + ";charset=big5");
    Transport.send(msg);
    out.println("&#37109;&#20214;&#24049;&#38918;&#21033;&#20659;&#36865;");
    catch (MessagingException mex)
    mex.printStackTrace();
    %>
    </body>
    </html>
    ==================================
    i don't know why i always get the error about the type even i already add the jar file in lib folder:
    InternetAddress cannot be resolved to a type
    javax.mail.Session cannot be resolved to a type

    What server are you using?
    Did you follow the instructions on the JavaMail FAQ for setting up the server?
    Did you restart the server?

  • Mail Session configuration authorization

    Hi,
    I hava deployed the confirmer app from tutorial.
    I got exception when sending a message saying I have to use authorization.
    I know how to do it the hard way (in code obtain other mail session)
    I tried to add a single property to the mail session, but it deletes all properties from java mail session ! (mail-from for example)
    Why the container doesn't use auth info I give when setting user and pass in JNDI reference ?
    How to add this property, so other aren't affected ?
    Thanks.

    I am not sure I totally understand your question. Are you saying that if you follow the instructions in the tutorial for the confirmer app, it does not work?
    Please clarify if possible.

  • Old Oracle Session with Tomcat is not kiiling automatically

    Hi,
    I am facing a problem of increasing inactive oracle sessions with tomcat, Old Oracle sessions with tomcat are visible with new one.
    if somebaody did not restarted tomcat gracefully, then does Oracle keep the session connected or is there any way that whenever any one restarted tomcat abnormally, Oracle session can be killed.
    I had restart the database to kill session.

    Could you please tell me that where do i set this parameter in parameter file or sql net file and what is the recommended value, do you have any document on this.
    Another thing tomcat is in other server machine and my database is in different server machine, killing process in tomcat server machine manually may not kill linux process on oracle database machine and therefore oracle sessions are still there.
    Is it possible?
    Edited by: user605066 on 28-Aug-2008 04:59

  • Getting a Mail session from Initialcontext

    Hi,
    Does anyone know how to configure oc4j such that i could get a mail session by looking up in the initial context? I know it could be done in jboss by altering an xml file. But I am not sure how to do it in oc4j. Could someone help please?
    Could any one explain to me what is the use of PortableRemoteObject.narrow method used for? As down cast could be done directly, why is there a need for PortableRemoteObject. Thanks
    if say, part of the j2ee application (some ejb jar files) is running on a host, and the j2ee application (some different ejb jar files) is running on a different host, and to look up the ejb on diferrent host normal java casting cannot be done cause they are network appart. So we need PortableRemoteObject to do the down casting. Is that right?
    If say, on a different situation, a server (orion or weblogic) is running on a host and the j2ee application is on another different host, to get the initial context, we need to set the provider and the uri say something like t3 for weblogic and ormi for orion... Am I right so far? please correct me if i am not. And to lookup the DataSource for connection pooling in order to get a connection, do we need to use portable remove object as well? I think so cause they are separated and they should communicate using rmi-iiop? Is that correct?
    Is CreateException, FinderException, RemoveException and EJBException applicable to their respective methods? Say CreateException is thorwn when problems in creating a bean instance and finder when canno find bean due to (maybe connection or sql error) etc. RemoveException when ejbRemove encounter problems and EJBException when business methods cannot succeed? In sun tutorial all methods throw EjbException which confused me. Could someone shed some light on this issue please?
    Thanks a lot
    Ras

    No.

  • Gmail mail-session

    Hi,
    I hope that someone can help me.
    I'm trying to send an email from a jsp file with oc4j 10.1.2 and 10.1.3 and i receive the same error.
    javax.mail.SendFailedException: Sending failed;
    nested exception is:
         class javax.mail.AuthenticationFailedException
         at javax.mail.Transport.send0(Transport.java:218)
         at javax.mail.Transport.send(Transport.java:80)
         at untitled1.jspService(_untitled1.java:79)
         [untitled1.jsp]
         at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
         at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
         at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
         at java.lang.Thread.run(Thread.java:595)
    I configure the <mail-session> like this.
    <mail-session location="mail/GmailSmtpServer" smtp-host="smtp.gmail.com">
    <property name="mail.smtp.port" value="465"/>
    <property name="mail.smtp.auth" value="true"/>
    <property name="mail.smtp.user" value="[email protected]"/>
    <property name="password" value="xxxxxxxx"/>
    <property name="mail.smtp.starttls.enable" value="true"/>
    <property name="mail.smtp.socketFactory" value="javax.net.ssl.SSLSocketFactory"/>
    </mail-session>
    If i try with tomcat with the same configuration and it works perfect.
    <Resource name="mail/GmailSmtpServer"
    auth="Container"
    type="javax.mail.Session"
    mail.smtp.host="smtp.gmail.com"
    mail.smtp.port="465"
    mail.smtp.auth="true"
    mail.smtp.user="[email protected]"
    password="xxxxxxx"
    mail.smtp.starttls.enable="true"
    mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
    />
    Thank You.
    JP

    I had an error with
    <property name="mail.smtp.socketFactory.class" value="javax.net.ssl.SSLServerSocketFactory"/>
    because i put mal.smtp.socketFactory without the .class
    Now i receive a different error
    java.io.IOException: Couldn't connect using "javax.net.ssl.SSLServerSocketFactory" socket factory to host, port: smtp.gmail.com, -1; Exception: java.lang.NoSuchMethodException: javax.net.ssl.SSLServerSocketFactory.createSocket(java.lang.String, int)
    I attached the jsse.jar, but it didn't resolve the problem.
    Thanks.
    JP

  • Unable to lookup javax.mail.Session in JNDI lookup

    Hi,
    We are getting java.io.NotSerializable exception when trying to lookup javax.mail.Session
    in JNDI lookup.
    The code is as follows:
    try {
    Hashtable ht = new Hashtable();
    ht.put(Context.PROVIDER_URL, "t3://localhost:localport");
    ht.put (Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Context ctx = new InitialContext(ht);
    try {
    Object obj = ctx.lookup("jndiname_of_Mailsession");
    session = (Session)javax.rmi.PortableRemoteObject.narrow(obj, Session.class);
    } catch (Exception ex1) {
    ex1.printStackTrace();
    The exception stacktrace is as follows:
    javax.naming.ConfigurationException. Root exception is java.rmi.MarshalException:
    error marshalling return; nested exception is:
         java.io.NotSerializableException: javax.mail.Session
    java.io.NotSerializableException: javax.mail.Session
    We are using Weblogic 6.0 SP2.
    Any clue will be helpful to us.
    Thanks.

    Hello Sumit
    You've got this exception because javax.mail.Session is not serializable. It
    does not depend on whatever implementation you use. In fact you can only use
    the mail session you set up when you are in the server. I mean, when you try
    to use it from an EJB, http bean session or whatever code that runs in the
    weblogic server. Weblogic does not give a Serialized copy of the session to
    the client but directly a reference on the only one Session created at boot
    time, even if you lookup for it.
    In your exemple, you try to get a reference on a Session from a client
    program. It cannot work ! Session is not Serializable.
    Hope this help
    dom
    "Sumit " <[email protected]> a écrit dans le message news:
    3b3ac101$[email protected]..
    >
    Hi,
    We are getting java.io.NotSerializable exception when trying to lookupjavax.mail.Session
    in JNDI lookup.
    The code is as follows:
    try {
    Hashtable ht = new Hashtable();
    ht.put(Context.PROVIDER_URL, "t3://localhost:localport");
    ht.put (Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    Context ctx = new InitialContext(ht);
    try {
    Object obj = ctx.lookup("jndiname_of_Mailsession");
    session = (Session)javax.rmi.PortableRemoteObject.narrow(obj,Session.class);
    } catch (Exception ex1) {
    ex1.printStackTrace();
    The exception stacktrace is as follows:
    javax.naming.ConfigurationException. Root exception isjava.rmi.MarshalException:
    error marshalling return; nested exception is:
    java.io.NotSerializableException: javax.mail.Session
    java.io.NotSerializableException: javax.mail.Session
    We are using Weblogic 6.0 SP2.
    Any clue will be helpful to us.
    Thanks.

  • Can't get mail session

    I'm using
    Context context = new InitialContext();
    Session session = (Session)context.lookup(MAIL_SESSION);
    in a web application running under Sun ONE Application Server 7 Platform Edition and it's throwing me a
    java.lang.ClassCastException: com.sun.enterprise.deployment.MailConfiguration
    on the session. The context.lookup(MAIL_SESSION) is returning an object of type "com.sun.enterprise.deployment.MailConfiguration" instead of "javax.mail.Session", like it should. I used the GUI to set up the mail session. Is something configured wrong, or is this a bug? I can't find any documentation on the com.sun.enterprise.deployment.MailConfiguration class.

    Thanks for the detailed code.
    With more effort I was able to reduce it as shown below.
    com.sun.enterprise.deployment.MailConfiguration is the object I get with the JNDI lookup. This class is present in j2ee.jar (from java-sdk1.4.2) and in /opt/SUNWappserver/lib/appsrvr-rt.jar -- use the former in your IDE to compile the code, and do not deploy the j2ee.jar
    // Acquire our JavaMail session object
    Context initCtx = new InitialContext();
    final MailConfiguration mailConfig = (MailConfiguration)initCtx.lookup("mail/mymail");
    final java.util.Properties props = mailConfig.getMailProperties();
    final javax.mail.Session session = javax.mail.Session.getInstance(props);
    // Prepare our mail message
    final Message message = new MimeMessage(session);
    ....... <rest as in any other sample code u see> ....
    // Transport.send() gets to see
    // ALL the variables attributes of the session instance!
    Transport.send(message);
    // All of the following, does the same as the above ONE LINE OF CODE!
    // // Send our mail message
    // Transport trans = null;
    // try {
    //      // create transport object
    // trans = session.getTransport();
    // trans.connect();
    // // send email
    // trans.sendMessage(message, message.getAllRecipients());
    // }finally{
    // trans.close();
    You can verify that the JNDI lookup worked using these two lines of code...
    //          System.err.println("mailConfig.getMailProperties() returned :- ");
    //          props.list(System.err);
    ================
    Also, I tried all kinds of experiments with SJAS8.0 and 8.1 (as of Jan 2005) and I simply couldn't get hold of the javax.mail.Session object -- the commented code below was my various trials ...
    // Acquire our JavaMail session object
    Context initCtx = new InitialContext();
    // Context envCtx = (Context) initCtx.lookup("java:comp/env");
    // final javax.mail.Session session = (javax.mail.Session) envCtx.lookup("javamail/maakompa");
    //               // This returned a null ptr.
    // final javax.mail.Session session = (javax.mail.Session) initCtx.lookup("java:mail/maakompa");
    // // ClassCastException :- we get an object of type 'com.sun.enterprise.deployment.MailConfiguration mc;'
    //           final Object o = initCtx.lookup("java:comp/env/mail/maakompa");
    //               System.err.println("initCtx.lookup returned type '"+o.getClass().getName()+"'.");
    //get properties and create session
    // java.util.Properties props = new java.util.Properties();
    // props.put("mail-host", "mailfwd0.localdomain");
    // props.put("mail-user", "sarma");
    // props.put("mail-from", "[email protected]");
    // props.put("mail-store.protocol", "pop3");
    // props.put("mail-transport.protocol", "smtp");

  • Defining a Mail Session

    Hello,
    I'd like to setup a Mail session in my WLS 6.0 sp2. I have to log in the
    mail server I use to send email, by providing login and password. Actually,
    I can't find the way to define a password on the properties of the mail
    seesion (I'd like all of the user of my realm to use the same login and
    password to connect to the mail server). What is the name of the property I
    have to use to set the login and password for this mail session ?
    Regards.
    Dom

    If you keep the connection open across pages, you're going to need to deal with
    timeouts - from the http session and from the mail server.
    If you don't keep the connection open, you're going to need to "resynchronize"
    your view of the store/folder with each operation, in case the folder is modified
    by another session.
    The former is easier in the common cases, especially if you don't care how gracefully
    you handle failures. The latter is more difficult in the common cases, but handles
    failure better, and in particular handles clustering better. You'll need to measure it to
    see if it meets your performance and scalability requirements. You may need to mix
    the two approaches to get acceptable performance.

  • VZ Contact Transfer will not work on Wi-Fi; Synch with iTunes sets up mail

    VZ Contact Transfer goes into a loop with Verizon iPhone connected to your Wi-Fi and does not work.
    Your wi-fi network will come up right after registering VZ iPhone. You could wait until later to allow it to connect.
    Otherwise, disconnect router to force iPhone onto Verizon 3G network and proceed. If you click the change phone number button, it will get you a new access code to your old Verizon contacts from Verizon back up. (Back up before signing up on iPhone)
    Took me hours of fooling around to learn this on another bulletin board.
    Also after hours of fooling around to set up mail, synched iPhone thru iTunes to mail, calendar, etc and the email accounts set themselves up.
    Hope this saves you some time
    Enjoy!

    I don't have an answer for you but from my experience iOS WiFi syncing has always been a hit and miss affair (more miss than hit I'm afraid). I have gotten to the stage where I rarely use the WiFi sync. It is just quicker, easier and much less stressful to use the USB cable. I am having the same issues with all the iOS devices in our family which includes various models of iPhone, iPad and an iPod Touch and have been having them since WiFi syncing was introduced (in iOS5 ???). And then I have not even mentioned my favorite iTunes syncing messages: "Waiting for items to copy" and "Waiting for changes to be applied"!
    iTunes is always extremely quick and eager to pick up the devices but as soon as I click on sync it shows "Looking for iDevice" and then the device disappears. I have found that initiating the sync from the Settings app on the device prevents this issue.
    It does however seem as if it is worse with Windows 7. I did not have so many issues with my previous Windows Vista PC.
    Sorry I cannot be of any help.

  • Hi I have two questions. I am using NAS 4.1 and was wondering is it possible to set a different session timeout for different users? How is the session timeout set? Thanks, YS

     

    <i>I am using NAS 4.1 and was wondering is it possible to set a different session timeout for different users?</i>
    Um, there is no such thing as NAS4.1.
    I'm assuming that you mean NAS4.0 (maybe NAS4.0sp1?). If so, then the session timeouts are specified in the session section of the NTV configuration files.
    AFAIK, you can specify session timeouts on a per user basis.

Maybe you are looking for