Skip to content

Instantly share code, notes, and snippets.

@pseudorandoom
Created November 20, 2013 21:16
Show Gist options
  • Save pseudorandoom/7571184 to your computer and use it in GitHub Desktop.
Save pseudorandoom/7571184 to your computer and use it in GitHub Desktop.
script para enviar en correos en liferay (el remitente tiene que coincidir con el correo para enviar notificaciones)
import com.liferay.util.mail.MailEngine; import javax.mail.internet.InternetAddress; import com.liferay.portal.kernel.util.PropsUtil; import com.liferay.portal.kernel.util.PropsKeys; MailEngine.send(new InternetAddress("[email protected]"), new InternetAddress("[email protected]"), "correo de prueba", /*PropsUtil.get(PropsKeys.ADMIN_EMAIL_FROM_ADDRESS)*/PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_SMTP_USER), false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment