eMailer Service

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

Moderators: Lapo, Bax

kincade
Posts: 7
Joined: 04 Feb 2011, 13:27
Location: Croatia

eMailer Service

Postby kincade » 14 Apr 2011, 15:50

According to release notes eMailer Service is available with RC2.
My question is how to access it from inside extension and how to send an email?
Cheers, Darko
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 15 Apr 2011, 08:31

You are right, there was some missing documentation about it.
The javadoc is now updated.

Quick example:

Code: Select all

Email myEmail = new SFSEmail("sender@email.com", "recipient@email.it", "Test mail", "Hello from SFS2X");
SmartFoxServer.getInstance().getMailService().sendMail(myEmail);

More on this in the javadoc:
http://docs2x.smartfoxserver.com/api-do ... ffice.html
Lapo
--
gotoAndPlay()
...addicted to flash games
whornak
Posts: 86
Joined: 22 Sep 2009, 11:05

Postby whornak » 20 Apr 2011, 01:22

I get the following when attempting to implement what you suggested in your quick example.

The type javax.mail.MessagingException cannot be resolved. It is indirectly referenced from required .class files

Could you provide direction on what library this is located in that I need to add to the build path?
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 20 Apr 2011, 10:59

If you are using SFS2X RC2, you should have a mailapi.jar file in you SFS2X/lib/ folder. If not maybe your update didn't work correctly
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
SmArt
Posts: 8
Joined: 09 Feb 2009, 22:19
Location: Ukraine
Contact:

Postby SmArt » 18 Dec 2011, 13:41

Lapo, when will you plan to give us new full packaged SFS2X? Upgrade from RC1 with patches is very unstable.
Be smart...
User avatar
Bax
Site Admin
Posts: 4609
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 19 Dec 2011, 09:24

SmArt wrote:Lapo, when will you plan to give us new full packaged SFS2X? Upgrade from RC1 with patches is very unstable.

What does "unstable" means? No issues have ever been reported with the patching system.
Paolo Bax
The SmartFoxServer Team
burnside
Posts: 24
Joined: 11 Mar 2017, 09:30

Re: eMailer Service

Postby burnside » 26 Apr 2018, 20:20

Posting for posterity. I spent an hour or so trying to use the example, debugging imports, etc.

Finally I realized it's sendMail(), not sendEmail(), so the example seems to be wrong.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: eMailer Service

Postby Lapo » 30 Apr 2018, 09:25

thanks, it's fixed.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 53 guests