Could not send email

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
Wei
Posts: 50
Joined: 13 Jun 2017, 08:16

Could not send email

Postby Wei » 23 Jul 2017, 23:11

I want to send some emails from my extension, but something wrong here

here is my code

Code: Select all

public class FeedbackHandler extends BaseClientRequestHandler {

    @Override
    public void handleClientRequest(User user, ISFSObject objIn) {
   
        ISFSObject objOut = new SFSObject();
        String subject = objIn.getUtfString("name");
        String message = objIn.getUtfString("content");
        Email myEmail = new SFSEmail("aaa@email.com", "bbb@email.com", subject, message);
        SmartFoxServer.getInstance().getMailService().sendMail(myEmail);
    }
}



here is the error message

Information:java: Errors occurred while compiling module 'LobbyExtension'
Information:javac 1.8.0_121 was used to compile java sources

Error:(27, 63) java: can not access javax.mail.MessagingException
can not find javax.mail.MessagingException
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Could not send email

Postby Lapo » 24 Jul 2017, 07:16

Hi,
the MessagingException class is found in the mailapi.jar located under SFS2X/lib/

You can add that jar file to your project's libraries.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 86 guests