You would basically be writing a mailet that is a one-way mailing list.
Still, there's no need to do this with a mailet when you could do this just
as easily in the message creation. Depends what you're using the write it I
suppose... if you want to compose the message with Outlook (or some mail
client) and just send it to a single address and have the mail send it to
everyone, then a mailet is the right tool for the job. If you've got some
other way you create the messages that can already pull the message list
from the database, then you don't need a mailet.
Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "Nick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 04, 2001 1:44 AM
Subject: Re: Disabling javax.mail.SendFailedException: 552 Too many receipts
> Hi,
>
> I am really looking to set up something that is a newsletter rather than a
> mailing list. I don't want people to be able to email everyone else on the
> list. I have a database of emails that I would like to be able to grab and
> add them to a mail queue and send out the letter. Would the Mailet enable
> this sort of thing?
>
> Thanks,
>
> Stef
>
>
> ----- Original Message -----
> From: "Labib Iskander, Marcus" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, September 03, 2001 1:49 PM
> Subject: AW: Disabling javax.mail.SendFailedException: 552 Too many
receipts
>
>
> Hi Nick,
>
> please excuse my question, but wouldn't you normally want to send to only
> one recipient at a time, instead of telling the people every single
address
> which recieved the same message? Not to mention the waste of transfer
> bandwidth sending an email whichs header is bigger than the body.
> You could use some mailinglist tool. I am not used to the mailinglist
tools
> of james (certainly there is some cool way to use them) but with a mailet
> you could implement it easily.
> You just send to a single email address which will be processed by the
> mailet:
> <mailet match="RecipientIs='[EMAIL PROTECTED]'" class="MyList">
> <mailinglist>list1</mailinglist>
> </mailet>
>
> The mailet shoud look like this (analog to the
> org.apache.james.transport.mailets.Forward mailet):
>
> package mymailets;
>
> import org.apache.mailet.*;
> import java.util.*;
> import javax.mail.*;
> import javax.mail.internet.*;
>
> public class MyList extends GenericMailet {
>
> private String mailinglist;
>
> public void init() throws MessagingException {
> mailinglist = getMailetConfig().getInitParameter("mailinglist");
> }
>
> private MailAddress [] getRecipients(String listName) {
> // your code
> }
>
> public void service(Mail mail) throws MessagingException {
> MailAddress [] recipients = getRecipents(mailinglist);
> for (int i=0;i<recipients.length;i++) {
> getMailetContext().sendMail(mail.getSender(), recipients[i],
> mail.getMessage());
> }
> mail.setState(Mail.GHOST);
> }
>
> public String getMailetInfo() {
> return "List Mailet";
> }
> }
>
>
> Dont forget to include this in the spoolmanager element
> <mailetpackages>
> <mailetpackage>mymailets.</mailetpackage>
>
> <mailetpackage>org.apache.james.transport.mailets.</mailetpackage>
> </mailetpackages>
>
> And take care that the transport processor is configured to send mail from
> the mailaddress your webapplication is using to the outside, because the
> MailetContext.sendMail() passes the mail directly to the transport
> processor.
>
> Greetings,
> Marcus
>
> -----Urspr�ngliche Nachricht-----
> Von: Nick [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 3. September 2001 19:24
> An: [EMAIL PROTECTED]
> Betreff: Disabling javax.mail.SendFailedException: 552 Too many receipts
>
>
> Hi,
>
> I am trying to set up an application where I need to be able to mail
> thousands of people from our database via a web interface. My problem has
> been sending over 100 emails at a time where I get the 552 message. Is
there
> a way to disable this feature in James so that I can send my emails?
>
> Thanks,
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]