Page 1 of 1
email
Posted: 17 Feb 2006, 03:25
by goodguy20k
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.
Posted: 17 Feb 2006, 07:05
by Lapo
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

Posted: 16 Jun 2006, 12:16
by elmo
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
Posted: 20 Jun 2006, 10:48
by Lapo
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

Posted: 20 Jun 2006, 14:30
by elmo
thank you Lapo

Posted: 22 Dec 2006, 10:15
by elmo
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
Posted: 26 Dec 2006, 17:06
by Lapo
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
Posted: 05 Oct 2011, 20:11
by bradsears
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.