email

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
goodguy20k
Posts: 71
Joined: 10 Jan 2006, 23:58
Location: Texas, USA
Contact:

email

Postby goodguy20k » 17 Feb 2006, 03:25

Can I specify more email settings? Like SMTP port? Can I use a SSL? My guess is no, but that I can do something like that through a Java extension. Just have to ask.
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 17 Feb 2006, 07:05

At the moment no.
I will add these features to the todo list ... :)

Of course on the extensions side you could implement your own mailer system, maybe based on the javamail package or similar

:)
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
elmo
Posts: 9
Joined: 16 Jun 2006, 12:13

Postby elmo » 16 Jun 2006, 12:16

hello,
i cannot find a way to use sendMail() in a java extension,
i was wondering if i have to write my own mailer system using javamail


thanks
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 20 Jun 2006, 10:48

In order to send from Java you have to do the following:

Code: Select all

import it.gotoandplay.smartfoxserver.lib.MailManager

MailManager mailer = MailManager.getInstance()
mailer.sendMail(from, to, subject, message)


All params in the sendMail() method are Strings
The method returns true if the email was sent successfully

hope it helps :)
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
elmo
Posts: 9
Joined: 16 Jun 2006, 12:13

Postby elmo » 20 Jun 2006, 14:30

thank you Lapo :D
User avatar
elmo
Posts: 9
Joined: 16 Jun 2006, 12:13

Postby elmo » 22 Dec 2006, 10:15

Hello Lapo,

How it is possible to send messages with special characters (chinese for example) using this sendMail function?

when I'm using mailer.sendMail(from, to, subject, message) it seems chinese characters are destroyed.

thanks
User avatar
Lapo
Site Admin
Posts: 23007
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 26 Dec 2006, 17:06

How it is possible to send messages with special characters (chinese for example) using this sendMail function?

Yes of course.
when I'm using mailer.sendMail(from, to, subject, message) it seems chinese characters are destroyed.


Suggestion: save your message as an external UTF-8 text or html file and load it at runtime in the server extension. This way you don't have to change your extension in order to modify the message and the UTF-8 will preserve all the foreign characters.

hope it helps
Lapo

--

gotoAndPlay()

...addicted to flash games
bradsears
Posts: 14
Joined: 22 Dec 2009, 22:01

Postby bradsears » 05 Oct 2011, 20:11

Hi. I'm trying to form a dynamic email with a verification link etc. Do I use multiple external files and form the message like that? My French characters appear in gmail but not in hotmail and it is driving my client crazy.

I'm in 1.6.9.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 18 guests