[Building Sakai] How to send a email?

Steve Swinsburg steve.swinsburg at gmail.com
Mon Nov 30 23:36:15 PST 2009


You need to configure this in sakai.properties.

See Outgoing Mail section here http://confluence.sakaiproject.org/display/DOC/Sakai+Admin+Guide+-+Email+Configuration


cheers,
Steve


On 01/12/2009, at 6:24 PM, Sam Chow wrote:

> 
> i try to use emailservice.send
> but it has error occur, where can i change the domain of sender address:
> 
> 2009-12-01 15:23:11,453  WARN http-8080-Processor25
> org.sakaiproject.email.impl.BasicEmailService - Email.sendMail: exception:
> Sending failed;
>  nested exception is:
> 	class javax.mail.MessagingException: 553 5.1.8 <postmaster at cmsdev>...
> Domain of sender address postmaster at cmsdev does not exist
> 
> javax.mail.SendFailedException: Sending failed;
>  nested exception is:
> 	class javax.mail.MessagingException: 553 5.1.8 <postmaster at cmsdev>...
> Domain of sender address postmaster at cmsdev does not exist
> 
> 	at javax.mail.Transport.send0(Transport.java:218)
> 	at javax.mail.Transport.send(Transport.java:102)
> 	at
> org.sakaiproject.email.impl.BasicEmailService.sendMessageAndLog(BasicEmailService.java:1090)
> 	at
> org.sakaiproject.email.impl.BasicEmailService.sendMail(BasicEmailService.java:486)
> 	at
> org.sakaiproject.email.impl.BasicEmailService.sendMail(BasicEmailService.java:286)
> 	at
> org.sakaiproject.email.impl.BasicEmailService.send(BasicEmailService.java:555)
> 	at SakaiScript.addNewUser(SakaiScript.java:121)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at
> org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
> 	at
> org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
> 	at
> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
> 	at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
> 	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> 	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> 	at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
> 	at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
> 	at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
> 	at
> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.sakaiproject.util.RemoteHostFilter.doFilter(RemoteHostFilter.java:188)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:616)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
> 	at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
> 	at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
> 	at java.lang.Thread.run(Thread.java:595)
> 
> 
> Sam Chow wrote:
>> 
>> Many Thanks! There are no more error.
>> 
>> Every thing seems going well but the email is not received. What should i
>> check now?
>> 
>> 
>> 
>> Steve Swinsburg-3 wrote:
>>> 
>>> The constructor and private variables need to go inside the actual class.
>>> 
>>> So it will be:
>>> 
>>> public class SakaiScript {
>>> 	
>>>   private static final Log LOG = LogFactory.getLog(SakaiScript.class);
>>>   private EmailService emailService;
>>> 
>>>   public SakaiScript() { 
>>>        emailService = (EmailService)
>>> ComponentManager.get(EmailService.class.getName()); 
>>>   }
>>> 
>>>   ...
>>> 
>>> 
>>> }
>>> 
>>> where .... is the rest of the classes methods.
>>> 
>>> cheers,
>>> Steve
>>> 
>>> 
>>> 
>>> On 01/12/2009, at 5:21 PM, Sam Chow wrote:
>>> 
>>>> 
>>>> I attached my SakaiScript.jws, thanks a lot
>>>> 
>>>> 
>>>> Steve Swinsburg-3 wrote:
>>>>> 
>>>>> You don't need to touch anything in the POMs if using the webservices
>>>>> only, you especially never need to touch the SAKAI-SRC/master/pom.xml
>>>>> nor
>>>>> SAKAI-SRC/pom.xml
>>>>> 
>>>>> Attach your entire SakaiScript.jws and the error message.
>>>>> 
>>>>> thanks,
>>>>> Steve
>>>>> 
>>>>> 
>>>>> On 01/12/2009, at 5:06 PM, Sam Chow wrote:
>>>>> 
>>>>>> 
>>>>>> the error still orrcur.
>>>>>> 
>>>>>> i add this in my master/pom.xml, is it correct?
>>>>>> 
>>>>>>    <dependency> 
>>>>>> 	    <groupId>org.sakaiproject.kernel</groupId> 
>>>>>>  	<artifactId>kernel-api</artifactId> 
>>>>>>      <version>${sakai.version}</version>
>>>>>>      <scope>provided</scope>
>>>>>> 	  </dependency> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> Steve Swinsburg-3 wrote:
>>>>>>> 
>>>>>>> You still need to initialise emailService which you can do in the
>>>>>>> constructor of the class. Add this method:
>>>>>>> 
>>>>>>> public SakaiScript() {
>>>>>>> 	emailService = (EmailService)
>>>>>>> ComponentManager.get(EmailService.class.getName());
>>>>>>> }
>>>>>>> 
>>>>>>> (Note my initial constructor was truncated sorry)
>>>>>>> 
>>>>>>> Now, you can use the emailService in your web service methods.
>>>>>>> 
>>>>>>> cheers,
>>>>>>> Steve
>>>>>>> 
>>>>>>> 
>>>>>>> On 01/12/2009, at 4:51 PM, Sam Chow wrote:
>>>>>>> 
>>>>>>>> 
>>>>>>>> i just add:   ("private EmailService emailService" is the line 57)
>>>>>>>> 
>>>>>>>> import org.sakaiproject.component.cover.ComponentManager; 
>>>>>>>> import org.sakaiproject.email.api.EmailService; 
>>>>>>>> 
>>>>>>>> private EmailService emailService;
>>>>>>>> 
>>>>>>>> public class SakaiScript {
>>>>>>>> 	
>>>>>>>> private static final Log LOG = LogFactory.getLog(SakaiScript.class);
>>>>>>>> //emailService = (EmailService)
>>>>>>>> ComponentManager.get(EmailService()); 
>>>>>>>> 	
>>>>>>>> private Session establishSession(String id) throws AxisFault 
>>>>>>>> {
>>>>>>>> 	Session s = SessionManager.getSession(id);
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Steve Swinsburg-3 wrote:
>>>>>>>>> 
>>>>>>>>> Yes, a Maven compile will *not* pick this up as JWS files are
>>>>>>>>> compiled
>>>>>>>>> at
>>>>>>>>> runtime, ie when you first request the web service WSDL.
>>>>>>>>> 
>>>>>>>>> You need to fix whatever is broken as per the error report:
>>>>>>>>>>> Line 57, column 8:  'class' or 'interface' expected
>>>>>>>>>>> Line 62, column 13:  &lt;identifier&gt; expected
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> What parts did you add to SakaiScript.jws?
>>>>>>>>> 
>>>>>>>>> cheers,
>>>>>>>>> Steve
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On 01/12/2009, at 3:54 PM, Sam Chow wrote:
>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> I try to clean install again , but this error still occur :<
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Steve Swinsburg-3 wrote:
>>>>>>>>>>> 
>>>>>>>>>>> JWS files compile at runtime and whenever the file changes, so
>>>>>>>>>>> you'll
>>>>>>>>>>> get
>>>>>>>>>>> that if something is up with the recompile. It tells you what the
>>>>>>>>>>> issue
>>>>>>>>>>> is
>>>>>>>>>>> though:
>>>>>>>>>>> 
>>>>>>>>>>> Line 57, column 8:  'class' or 'interface' expected
>>>>>>>>>>> Line 62, column 13:  &lt;identifier&gt; expected
>>>>>>>>>>> 
>>>>>>>>>>> cheers,
>>>>>>>>>>> Steve
>>>>>>>>>>> 
>>>>>>>>>>> On 01/12/2009, at 2:51 PM, Sam Chow wrote:
>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> There are eror occur: 
>>>>>>>>>>>> 
>>>>>>>>>>>> 2009-12-01 11:48:02,468 ERROR http-8080-Processor22
>>>>>>>>>>>> org.apache.axis.handlers.JWSHandler - Exception:
>>>>>>>>>>>> AxisFault
>>>>>>>>>>>> faultCode: {http://xml.apache.org/axis/}Server.compileError
>>>>>>>>>>>> faultSubcode: 
>>>>>>>>>>>> faultString: Error while compiling: 
>>>>>>>>>>>> G:\Tomcat\webapps\sakai-axis\WEB-INF\jwsClasses\SakaiScript.java
>>>>>>>>>>>> faultActor: 
>>>>>>>>>>>> faultNode: 
>>>>>>>>>>>> faultDetail: 
>>>>>>>>>>>> 	{}Errors:Error compiling
>>>>>>>>>>>> G:\Tomcat\webapps\sakai-axis\WEB-INF\jwsClasses\SakaiScript.java:
>>>>>>>>>>>> Line 57, column 8:  'class' or 'interface' expected
>>>>>>>>>>>> Line 62, column 13:  &lt;identifier&gt; expected
>>>>>>>>>>>> Line 0, column 0: 
>>>>>>>>>>>> 2 errors
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> Error while compiling: 
>>>>>>>>>>>> G:\Tomcat\webapps\sakai-axis\WEB-INF\jwsClasses\SakaiScript.java
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.axis.handlers.JWSHandler.setupService(JWSHandler.java:232)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.axis.handlers.JWSHandler.invoke(JWSHandler.java:72)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>>>>>>>>>>> 	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>>>>>>>>>>>> 	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.axis.server.AxisServer.invoke(AxisServer.java:249)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
>>>>>>>>>>>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>>>>>>>>>>>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.sakaiproject.util.RemoteHostFilter.doFilter(RemoteHostFilter.java:188)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:616)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
>>>>>>>>>>>> 	at
>>>>>>>>>>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
>>>>>>>>>>>> 	at java.lang.Thread.run(Thread.java:595)
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> Steve Swinsburg-3 wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> If you want to do it from the Web Services, you'll need to use
>>>>>>>>>>>>> the
>>>>>>>>>>>>> ComponentManager:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> import org.sakaiproject.component.cover.ComponentManager;
>>>>>>>>>>>>> import org.sakaiproject.email.api.EmailService;
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Create an instance var and class constructor:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> private EmailService emailService;
>>>>>>>>>>>>> public SakaiScript() {
>>>>>>>>>>>>> 	emailService = (EmailService)
>>>>>>>>>>>>> ComponentManager.get(EmailService());
>>>>>>>>>>>>> }
>>>>>>>>>>>>> 
>>>>>>>>>>>>> use it:
>>>>>>>>>>>>> emailService.xxx();
>>>>>>>>>>>>> 
>>>>>>>>>>>>> I'm (eventually) going to convert the web services over to use
>>>>>>>>>>>>> the
>>>>>>>>>>>>> other
>>>>>>>>>>>>> API's like this so we can get rid of the static covers.
>>>>>>>>>>>>> 
>>>>>>>>>>>>> cheers,
>>>>>>>>>>>>> Steve
>>>>>>>>>>>>> 
>>>>>>>>>>>>> On 01/12/2009, at 1:43 PM, Sam Chow wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Thanks Steve.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> It is very helpful, but I cannot find the component.xml in web
>>>>>>>>>>>>>> services.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Steve Swinsburg-3 wrote:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Hi Sam,
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Once you have the dependecy setup in your POM, then you can
>>>>>>>>>>>>>>> inject
>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>> API
>>>>>>>>>>>>>>> via your Spring config and a Javabean style setter in your
>>>>>>>>>>>>>>> implementation. 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> in components.xml
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> <bean id="yourbean">
>>>>>>>>>>>>>>> ...
>>>>>>>>>>>>>>> <property name="emailService"><ref
>>>>>>>>>>>>>>> bean="org.sakaiproject.email.api.EmailService"/></property>
>>>>>>>>>>>>>>> ...
>>>>>>>>>>>>>>> </bean>
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> in your impl:
>>>>>>>>>>>>>>> private EmailService emailService;
>>>>>>>>>>>>>>> public void setEmailService(EmailService emailService) {
>>>>>>>>>>>>>>> 	this.emailService = emailService;
>>>>>>>>>>>>>>> }
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> then do something like:
>>>>>>>>>>>>>>> emailService.sendToUsers(receivers,
>>>>>>>>>>>>>>> getHeaders(user.getEmail(),
>>>>>>>>>>>>>>> subject),
>>>>>>>>>>>>>>> formatMessage(subject, message));
>>>>>>>>>>>>>>> to actually send the email.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> If any of that is foreign, take a look at the code generated
>>>>>>>>>>>>>>> in
>>>>>>>>>>>>>>> a
>>>>>>>>>>>>>>> sample
>>>>>>>>>>>>>>> app via the Sakai App Builder in Eclipse, or take a look at
>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>> Programmers Cafe docs in Confluence, there are some code
>>>>>>>>>>>>>>> examples. 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> Make sure you have the SMTP properties setup in
>>>>>>>>>>>>>>> sakai.properties
>>>>>>>>>>>>>>> too.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> cheers,
>>>>>>>>>>>>>>> Steve
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> On 30/11/2009, at 3:21 PM, Sam Chow wrote:
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Dear David, 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thanks for your information. Actually, i am still not
>>>>>>>>>>>>>>>> successful
>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>> use
>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>> api to send email.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Is it possible if i copy some code from
>>>>>>>>>>>>>>>> mailtool.processSendEmail
>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>> web
>>>>>>>>>>>>>>>> service for this my purpose?
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Thanks.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> David Horwitz wrote:
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Hi Sam,
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> You need to add the email API to your maven dependencies -
>>>>>>>>>>>>>>>>> seing
>>>>>>>>>>>>>>>>> you
>>>>>>>>>>>>>>>>> need to do this I presume your using Sakai 2.5 or earlier
>>>>>>>>>>>>>>>>> so
>>>>>>>>>>>>>>>>> add
>>>>>>>>>>>>>>>>> this
>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>> the dependencies of your maven pom.xml:
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> <dependency>
>>>>>>>>>>>>>>>>> <groupId>org.sakaiproject</grouipId>
>>>>>>>>>>>>>>>>> <artifactId>sakai-email-api<artifactId>
>>>>>>>>>>>>>>>>> </dependency>
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> If your using Sakai 2.6 or later the dependency you need is
>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>> kernel api (group= org.sakaiproject.kernel artifact=
>>>>>>>>>>>>>>>>> kernel-api)
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> David
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> On 11/27/2009 08:25 AM, Sam Chow wrote:
>>>>>>>>>>>>>>>>>> Dear David,
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> it will have compilation error if i  import
>>>>>>>>>>>>>>>>>> org.sakaiproject.email.api.EmailService;
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> What should i do, thanks!
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> David Horwitz wrote:
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> Hi Sam,
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> see the EmailService:
>>>>>>>>>>>>>>>>>>> http://source.sakaiproject.org/release/kernel/1.1.0-beta03/apidocs/org/sakaiproject/email/api/EmailService.html
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> D
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> On 11/24/2009 10:16 AM, Sam Chow wrote:
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Dear All,
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> I have already written a script to upload some user
>>>>>>>>>>>>>>>>>>>> information
>>>>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>>>>> sakai
>>>>>>>>>>>>>>>>>>>> with a random password. Now, i want to email the
>>>>>>>>>>>>>>>>>>>> information
>>>>>>>>>>>>>>>>>>>> message
>>>>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>>>>> the user automatcally after his informaiton is inserted
>>>>>>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>>>>>>> the
>>>>>>>>>>>>>>>>>>>> Sakai.
>>>>>>>>>>>>>>>>>>>> Is
>>>>>>>>>>>>>>>>>>>> there any email api i can call. 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Many Thanks!
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> Sam
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a
>>>>>>>>>>>>>>>>>>>> subject
>>>>>>>>>>>>>>>>>>>> of
>>>>>>>>>>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a
>>>>>>>>>>>>>>>>>>> subject
>>>>>>>>>>>>>>>>>>> of
>>>>>>>>>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a
>>>>>>>>>>>>>>>>> subject
>>>>>>>>>>>>>>>>> of
>>>>>>>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>>>> http://old.nabble.com/-Building-Sakai--How-to-send-a-email--tp26492029p26569429.html
>>>>>>>>>>>>>>>> Sent from the Sakai - Development mailing list archive at
>>>>>>>>>>>>>>>> Nabble.com.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject
>>>>>>>>>>>>>>>> of
>>>>>>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject
>>>>>>>>>>>>>>> of
>>>>>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> -- 
>>>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>>>> http://old.nabble.com/-Building-Sakai--How-to-send-a-email--tp26492029p26585678.html
>>>>>>>>>>>>>> Sent from the Sakai - Development mailing list archive at
>>>>>>>>>>>>>> Nabble.com.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject
>>>>>>>>>>>>>> of
>>>>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>>>> 
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>>>> 
>>>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> -- 
>>>>>>>>>>>> View this message in context:
>>>>>>>>>>>> http://old.nabble.com/-Building-Sakai--How-to-send-a-email--tp26492029p26585956.html
>>>>>>>>>>>> Sent from the Sakai - Development mailing list archive at
>>>>>>>>>>>> Nabble.com.
>>>>>>>>>>>> 
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>>> 
>>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>> 
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>>> 
>>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>>>>>>>> "unsubscribe"
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>> View this message in context:
>>>>>>>>>> http://old.nabble.com/-Building-Sakai--How-to-send-a-email--tp26492029p26586662.html
>>>>>>>>>> Sent from the Sakai - Development mailing list archive at
>>>>>>>>>> Nabble.com.
>>>>>>>>>> 
>>>>>>>>>> _______________________________________________
>>>>>>>>>> sakai-dev mailing list
>>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>>> 
>>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>>>>>>> "unsubscribe"
>>>>>>>>> 
>>>>>>>>> _______________________________________________
>>>>>>>>> sakai-dev mailing list
>>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>>> 
>>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>>>>>> "unsubscribe"
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- 
>>>>>>>> View this message in context:
>>>>>>>> http://old.nabble.com/-Building-Sakai--How-to-send-a-email--tp26492029p26587015.html
>>>>>>>> Sent from the Sakai - Development mailing list archive at
>>>>>>>> Nabble.com.
>>>>>>>> 
>>>>>>>> _______________________________________________
>>>>>>>> sakai-dev mailing list
>>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>>> 
>>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>>>>> "unsubscribe"
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> sakai-dev mailing list
>>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>>> 
>>>>>>> TO UNSUBSCRIBE: send email to
>>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>>>> "unsubscribe"
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> -- 
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/-Building-Sakai--How-to-send-a-email--tp26492029p26587122.html
>>>>>> Sent from the Sakai - Development mailing list archive at Nabble.com.
>>>>>> 
>>>>>> _______________________________________________
>>>>>> sakai-dev mailing list
>>>>>> sakai-dev at collab.sakaiproject.org
>>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>>> 
>>>>>> TO UNSUBSCRIBE: send email to
>>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>>> "unsubscribe"
>>>>> 
>>>>> _______________________________________________
>>>>> sakai-dev mailing list
>>>>> sakai-dev at collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>>> 
>>>>> TO UNSUBSCRIBE: send email to
>>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>>> "unsubscribe"
>>>>> 
>>>>> 
>>>> http://old.nabble.com/file/p26587217/SakaiScript.jws SakaiScript.jws 
>>>> -- 
>>>> View this message in context:
>>>> http://old.nabble.com/-Building-Sakai--How-to-send-a-email--tp26492029p26587217.html
>>>> Sent from the Sakai - Development mailing list archive at Nabble.com.
>>>> 
>>>> _______________________________________________
>>>> sakai-dev mailing list
>>>> sakai-dev at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>> 
>>>> TO UNSUBSCRIBE: send email to
>>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>>> "unsubscribe"
>>> 
>>> 
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>> 
>>> TO UNSUBSCRIBE: send email to
>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>> "unsubscribe"
>>> 
>> 
>> 
> 
> -- 
> View this message in context: http://old.nabble.com/-Building-Sakai--How-to-send-a-email--tp26492029p26587599.html
> Sent from the Sakai - Development mailing list archive at Nabble.com.
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3823 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20091201/15ebb021/attachment.bin 


More information about the sakai-dev mailing list