[Yanel-dev] Re: [Yanel-commits] rev 47279
- public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources
Guillaume Déflache
guillaume.deflache at wyona.com
Thu Jan 28 07:17:35 CET 2010
Hi!
michi at wyona.com a écrit :
> Author: michi
> Date: 2010-01-27 12:14:31 +0100 (Wed, 27 Jan 2010)
> New Revision: 47279
>
> Modified:
> public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/BasicFormResource.java
> Log:
> use MailUtil for sending emails
>
> Modified: public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/BasicFormResource.java
> ===================================================================
> --- public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/BasicFormResource.java 2010-01-27 11:13:58 UTC (rev 47278)
> +++ public/yanel/contributions/resources/creatable-modifiable-deletable-v3/src/java/org/wyona/yanel/impl/resources/BasicFormResource.java 2010-01-27 11:14:31 UTC (rev 47279)
> @@ -141,6 +141,8 @@
> }
>
> /**
> + * @deprecated Use org.wyona.yanel.core.util.MailUtil.send() instead
> + *
> * Sends an email. E.g. use this method to send confirmation mails.
> *
> * @param from sender email address
> @@ -150,6 +152,11 @@
> * @param content email content
> */
> protected void sendMail(String from, String replyTo, String to, String subject, String content) throws Exception {
> + log.warn("DEPRECATED");
> + org.wyona.yanel.core.util.MailUtil.send(from, replyTo, to, subject, content);
> +
> +
> +/*
> // Create a mail session
> java.util.Properties props = new java.util.Properties();
> props.put("mail.smtp.host", getResourceConfigProperty("smtpHost"));
> @@ -170,14 +177,17 @@
> msg.setRecipient(Message.RecipientType.TO, new InternetAddress(to));
> msg.setSubject(subject);
> msg.setText(content);
> +*/
>
> /*
> msg.setSubject(subject,"utf-8");
> msg.setContent(content, "text/plain;charset=utf-8");
> */
>
> +/*
> // Send the message
> Transport.send(msg);
> +*/
> }
>
> /**
>
Why comment this code instead of simply deleting it?
Cheers,
Guillaume
More information about the Yanel-development
mailing list