3 Replies Latest reply on Dec 20, 2011 10:54 AM by rogermorituesta.rogermori.yahoo.com

    Help with Seam mail and style (css)

    kakakarl

      Hello!


      I have followed the simple seam mail examples to be found for example here:
      http://docs.jboss.org/seam/1.1.5.GA/reference/en/html/mail.html


      Sending the mail is no problem. I fact, the only problem I have is that It's hard to make it look good. I'm sure it gets sent as HTML but I can't figure out how to include css style...


      The best would be if I could get the external stylesheets to work?


      I did read that I may have to set urlbase but I cant find any examples of this. Can someone supply this? Would be really helpful.



      If the tag requires access to external resources such as stylesheets or JavaScript, be sure to set the urlBase

      Very straightforward but how to?


      Actually I guess my base question is, what's best practice to make the email look at least decent? Because now when I send the mail it even strips datatables of every border etc.


      I am using seam 2.2.2 with richfaces 3.3.3.


      Any help appreciated!


        • 1. Re: Help with Seam mail and style (css)
          kragoth

          Try reading the more up to date doco. It shows you how to set the urlBase attribute.


          Up to date doco


          Other then that from what I have read I don't see any reason why your approach wont work. I think you just need to spend a bit more time researching how other people have done it.

          • 2. Re: Help with Seam mail and style (css)
            kakakarl

            Hi and thanks for answering.


            Unfortunately for me that documentation didn't help either. I came across it before and while it's helpful enough to let me know that urlbase can be set to m:message, a beginner like me still have no idea what urlbase is etc.


            Further, the external stylesheets is one thing but im missing even the css that's built into the various components?


            I'm afraid i need some more specific pointers on how to make the emails look good but thanks anyways!


             

            • 3. Re: Help with Seam mail and style (css)
              rogermorituesta.rogermori.yahoo.com

              Hi Karl:


              External css stylesheets are sensitive to the particular SMTP server rules in use;
              they might work with some providers but not will all.


              You can use inline or embedded styles with no major problems.


              Even with Seam you can store the email content in a database table, and use it runtime.


              Regards.


              Roger.