You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Will Glass-Husain <wg...@forio.com> on 2003/06/06 23:59:59 UTC

email problem with MultiPartEmail

Hi,

I'm having an odd problem with the MultiPartEmail that I'm using in my web app.  I use this to send an email message when an error occurs.  The email message gets sent, but it arrives without the attachments and without a message.  Oddly, this works fine from my dev machine (Win XP, Tomcat 4.1.12), but not from my production machine (Linux, Tomcat 4.1.18).

I tried the obvious 
-- I've used a log statement to confirm that the MultiPartEmail.setMsg gets the correct message text, and that the file attachments are created
-- No exceptions are thrown.
-- SimpleEmail (used for other error reporting tasks) works fine

Anyone have any ideas?  Thanks in advance.

WILL

Re: Configuration for sending error reports as email

Posted by Edgar González <eg...@valhallaproject.com>.
Hi Daniel,

I do that, defining an SMTPAppender for my log4j categries. Following an
extract of my TR.props, which contains my log4j configuration:

# -------------------------------------------------------------------
#
#  L O G S
#
# -------------------------------------------------------------------
# Esta es la configuracion para el logging del sistema.
# Para el logging se utiliza Log4J, se define un unico log-facility
# a nivel de turbine que luego es utilizado como pass-through para
# suministrarle a Log4J las propiedades relacionadas con los Appenders y
# las categorias.
# -------------------------------------------------------------------

# Logging a nivel de Turbine
services.LoggingService.facilities=system
services.LoggingService.default=system
services.LoggingService.loggingConfig=org.apache.turbine.services.logging.Pr
opertiesLoggingConfig
services.LoggingService.system.className=org.apache.turbine.services.logging
.Log4JavaLogger
services.LoggingService.system.level=ALL

# Categories de Log4J ------------------------------------------------------

# Turbine
services.LoggingService.system.log4j.rootCategory=INFO, system, email
services.LoggingService.system.log4j.category.default=INFO, system, email
services.LoggingService.system.log4j.category.system=INFO, system, email

# Torque
services.LoggingService.system.log4j.category.org.apache.torque = ERROR,
database, email
services.LoggingService.system.log4j.additivity.org.apache.torque = false

# Velocity
services.LoggingService.system.log4j.category.velocity = ERROR, velocity,
email
services.LoggingService.system.log4j.additivity.velocity = false

# Quartz
#services.LoggingService.system.log4j.category.org.quartz = ERROR,
scheduler, email
#services.LoggingService.system.log4j.additivity.org.quartz = false

# Jobs
#services.LoggingService.system.log4j.category.com.valhallaproject.sao.event
os.jobs = ERROR, scheduler, email
#services.LoggingService.system.log4j.additivity.com.valhallaproject.sao.eve
ntos.jobs = false

# AtuinBasePeer
services.LoggingService.system.log4j.category.com.valhallaproject.atuin.om.A
tuinBasePeer = ERROR, database, email
services.LoggingService.system.log4j.additivity.com.valhallaproject.atuin.om
.AtuinBasePeer = false

# FormProc
services.LoggingService.system.log4j.category.org.formproc = ERROR, system,
email
services.LoggingService.system.log4j.additivity.org.formproc = false

# Atuin - FormProc
services.LoggingService.system.log4j.category.com.valhallaproject.atuin.serv
ices.formproc = ERROR, system, email
services.LoggingService.system.log4j.additivity.com.valhallaproject.atuin.se
rvices.formproc = false

# OSWorkflow
services.LoggingService.system.log4j.category.com.opensymphony.workflow =
ERROR, system, email
services.LoggingService.system.log4j.additivity.com.opensymphony.workflow =
false

# SAO - OSWorkflow
services.LoggingService.system.log4j.category.com.valhallaproject.sao.common
s.workflow = ERROR, system, email
services.LoggingService.system.log4j.additivity.com.valhallaproject.sao.comm
ons.workflow = false

# SAO
services.LoggingService.system.log4j.category.com.valhallaproject.sao =
ERROR, system, email
services.LoggingService.system.log4j.additivity.com.valhallaproject.sao =
false


# Appenders de Log4J -------------------------------------------------------

# Appender para las categorias Root y default (Turbine)
services.LoggingService.system.log4j.appender.system.file=${webappRoot}/logs
/system.log
services.LoggingService.system.log4j.appender.system=org.apache.log4j.FileAp
pender
services.LoggingService.system.log4j.appender.system.layout=org.apache.log4j
.PatternLayout
services.LoggingService.system.log4j.appender.system.layout.conversionPatter
n = %d [%t] %-5p %c - %m%n
services.LoggingService.system.log4j.appender.system.append = false

# Appender para las categorias relacionadas con la Base de Datos (Torque)
services.LoggingService.system.log4j.appender.database.file =
${webappRoot}/logs/database.log
services.LoggingService.system.log4j.appender.database =
org.apache.log4j.FileAppender
services.LoggingService.system.log4j.appender.database.layout =
org.apache.log4j.PatternLayout
services.LoggingService.system.log4j.appender.database.layout.conversionPatt
ern = %d [%t] %-5p %c - %m%n
services.LoggingService.system.log4j.appender.database.append = false

# Appender para las categorias relacionadas con los Templates (Velocity)
services.LoggingService.system.log4j.appender.velocity.file =
${webappRoot}/logs/velocity.log
services.LoggingService.system.log4j.appender.velocity =
org.apache.log4j.FileAppender
services.LoggingService.system.log4j.appender.velocity.layout =
org.apache.log4j.PatternLayout
services.LoggingService.system.log4j.appender.velocity.layout.conversionPatt
ern = %d [%t] %-5p %c - %m%n
services.LoggingService.system.log4j.appender.velocity.append = false

# Appender para las categorias relacionadas con el scheduler (Quartz)
#services.LoggingService.system.log4j.appender.scheduler.file =
${webappRoot}/logs/scheduler.log
#services.LoggingService.system.log4j.appender.scheduler =
org.apache.log4j.FileAppender
#services.LoggingService.system.log4j.appender.scheduler.layout =
org.apache.log4j.PatternLayout
#services.LoggingService.system.log4j.appender.scheduler.layout.conversionPa
ttern = %d [%t] %-5p %c - %m%n
#services.LoggingService.system.log4j.appender.scheduler.append = false

# Appender para todas las categorias que envia por e-mail los errores
services.LoggingService.system.log4j.appender.email =
org.apache.log4j.net.SMTPAppender
services.LoggingService.system.log4j.appender.email.layout =
org.apache.log4j.PatternLayout
services.LoggingService.system.log4j.appender.email.layout.conversionPattern
= %d [%t] %-5p %c - %m%n
services.LoggingService.system.log4j.appender.email.Threshold = Error
services.LoggingService.system.log4j.appender.email.SMTPHost =
mail.cantv.net
services.LoggingService.system.log4j.appender.email.To =
egg@valhallaproject.com,ard@valhallaproject.com,edf@valhallaproject.com
services.LoggingService.system.log4j.appender.email.From =
nobody@valhallaproject.com
services.LoggingService.system.log4j.appender.email.Subject = Error en
SAO-Eventos
services.LoggingService.system.log4j.appender.email.BufferSize = 1


I hope this help

----------------------------------------------------------------------------
Edgar Gonzalez Gonzalez
VALHALLA Project, s.a.
Chief Technology Officer
Web: www.valhallaproject.com
E-mail: egg@valhallaproject.com
Phone: +58-212-242.4379 / 6662 / 4055 / 6475
Fax: +58-212-242.6809

"The limits of my language mean the limits of my world."
Ludwig Wittgenstein

----------------------------------------------------------------------------


----- Original Message -----
From: "Daniel Ramagem" <da...@ssaihq.com>
To: "Turbine Users List" <tu...@jakarta.apache.org>
Sent: Monday, June 09, 2003 11:26 AM
Subject: Configuration for sending error reports as email


> Maybe someone can help me properly configure my instance of Turbine 2.2_01
> to send error reports (i.e. the turbine.log) via e-mail.  I know there is
a
> specific part of the TurbineResources.properties file for configuring
> Log4Java for doing this and I've used it to no avail:
>
> ...
> # An example configuration for sending error reports as email with
Log4Java
> # notes:
> # * uses 'mail.server' as SMTP server to send mail through
> # * log4j will send the email when an ERROR is logged, with
> #   'buffer.size' previous (non-ERROR) logs included in the email
> # * configured to log to a file as well otherwise stacktraces are lost
> services.LoggingService.email.destination.file=/logs/turbine.log
> services.LoggingService.email.destination.email.from=turbine@somewhere.com
> services.LoggingService.email.destination.email.to=myself@somewhere.com
> services.LoggingService.email.destination.email.subject=Turbine Error
Report
> services.LoggingService.email.destination.email.buffer.size=512
>
services.LoggingService.email.className=org.apache.turbine.services.logging.
> Log4JavaLogger
> services.LoggingService.email.level=ERROR
>
> I've also configured the "mail.server" and "mail.smtp.from" properties.
But
> I never get an e-mail from the system.
>
> BTW, I recently upgraded to T2.2 from T2.1 because I couldn't get it to
work
> from T2.1 either.
>
> Thanks for the help,
>
> Daniel.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Configuration for sending error reports as email

Posted by Daniel Ramagem <da...@ssaihq.com>.
Maybe someone can help me properly configure my instance of Turbine 2.2_01
to send error reports (i.e. the turbine.log) via e-mail.  I know there is a
specific part of the TurbineResources.properties file for configuring
Log4Java for doing this and I've used it to no avail:

...
# An example configuration for sending error reports as email with Log4Java
# notes:
# * uses 'mail.server' as SMTP server to send mail through
# * log4j will send the email when an ERROR is logged, with
#   'buffer.size' previous (non-ERROR) logs included in the email
# * configured to log to a file as well otherwise stacktraces are lost
services.LoggingService.email.destination.file=/logs/turbine.log
services.LoggingService.email.destination.email.from=turbine@somewhere.com
services.LoggingService.email.destination.email.to=myself@somewhere.com
services.LoggingService.email.destination.email.subject=Turbine Error Report
services.LoggingService.email.destination.email.buffer.size=512
services.LoggingService.email.className=org.apache.turbine.services.logging.
Log4JavaLogger
services.LoggingService.email.level=ERROR

I've also configured the "mail.server" and "mail.smtp.from" properties.  But
I never get an e-mail from the system.

BTW, I recently upgraded to T2.2 from T2.1 because I couldn't get it to work
from T2.1 either.

Thanks for the help,

Daniel.


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org