Cant use Simple Mail

156 views
Skip to first unread message

Philipp Baum

unread,
May 7, 2011, 4:59:21 PM5/7/11
to play-framework
Hello,

i just tryd to use SimpeMail like explained here:
http://www.playframework.org/documentation/1.2.1/emails

But i get the error ". Error raised is : SimpleEmail cannot be
resolved to a type"

My Code is exactly the example and i use import play.libs.*

Thanks, Phil

Julien Richard-Foy

unread,
May 8, 2011, 3:37:39 AM5/8/11
to play-fr...@googlegroups.com
Try adding:

import org.apache.commons.mail.*;

Philipp Baum

unread,
May 8, 2011, 4:52:41 PM5/8/11
to play-framework
Still got the problem "Unhandled exception type EmailException"
Highlighted line is the second.

SimpleEmail email = new SimpleEmail();
email.setFrom("sen...@bla.bb");


On May 8, 9:37 am, Julien Richard-Foy <j...@zenexity.com> wrote:
> Try adding:
>
>     import org.apache.commons.mail.*;

ahmed mahmoud

unread,
May 8, 2011, 6:45:57 PM5/8/11
to play-fr...@googlegroups.com
Just surround it with try and catch like that 

try{
email.setFrom("sen...@bla.bb");
} catch (EmailException e) {

e.printStackTrace();
}

and add this import: 
import org.apache.commons.mail.EmailException; 

=)


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.




--

Ahmed Mahmoud Mohammed Abd El-wahab 
el shaheer b Ahmed Fat7y.

Reply all
Reply to author
Forward
0 new messages