Academic Work Personal
|
Liferay /
Configuring gmail smtp server with Liferay
ProblemYou want to send e-mails from Liferay, for instance send a new password if the user forgot the old one. SolutionThe simplest way is to use a Gmail account for this purpose. This way you don't need to set up a mail server on your machine. First, create a dedicated Gmail account. Under Settings → Forwarding and POP/IMAP, you must enable POP and IMAP! Then, if you use Liferay 5.2+, create the following file with this contents: $LIFERAY/ROOT/WEB-INF/classes/portal-ext.properties : mail.session.mail.store.protocol=imap mail.session.mail.transport.protocol=smtp #smtp properties mail.session.mail.smtp.host=smtp.gmail.com mail.session.mail.smtp.password=validpassword mail.session.mail.smtp.user=validid@gmail.com mail.session.mail.smtp.port=465 mail.session.mail.smtp.auth=true mail.session.mail.smtp.starttls.enable=true mail.session.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory #mail.session.mail.smtp.socketFactory.fallback=false #mail.session.mail.smtp.socketFactory.port=465 # Other protocols mail.session.mail.imap.host=localhost mail.session.mail.pop3.host=localhost Then restart Tomcat. You don't need to put the values between quotes. For the username you must add NoteIt was not easy to figure all this out… Links:
The file |
![]() anime | bash | blogs | bsd | c/c++ | c64 | calc | comics | convert | cube | del.icio.us | digg | east | eBooks | egeszseg | elite | firefox | flash | fun | games | gimp | google | groovy | hardware | hit&run | howto | java | javascript | knife | lang | latex | liferay | linux | lovecraft | magyar | maths | movies | music | p2p | perl | pdf | photoshop | php | pmwiki | prog | python | radio | recept | rts | scala | scene | sci-fi | scripting | security | shell | space | súlyos | telephone | torrente | translate | ubuntu | vim | wallpapers | webutils | wikis | windows Blogs and Dev. * Ubuntu Incident Places Debrecen | France | Hungary | Montreal | Nancy Notes Hobby Projects * Jabba's Codes Quick Links [ edit ] |