You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by "Labib Iskander, Marcus" <ml...@cm-ag.de> on 2001/09/03 20:49:30 UTC
AW: Disabling javax.mail.SendFailedException: 552 Too many receip
ts
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='list1@mysite.com'" 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:nickm@studioweb.com]
Gesendet: Montag, 3. September 2001 19:24
An: james-user@jakarta.apache.org
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: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: Disabling javax.mail.SendFailedException: 552 Too many receipts
Posted by Serge Knystautas <se...@lokitech.com>.
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" <ni...@studioweb.com>
To: <ja...@jakarta.apache.org>
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" <ml...@cm-ag.de>
> To: <ja...@jakarta.apache.org>
> 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='list1@mysite.com'" 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:nickm@studioweb.com]
> Gesendet: Montag, 3. September 2001 19:24
> An: james-user@jakarta.apache.org
> 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: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: Disabling javax.mail.SendFailedException: 552 Too many receipts
Posted by Nick <ni...@studioweb.com>.
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" <ml...@cm-ag.de>
To: <ja...@jakarta.apache.org>
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='list1@mysite.com'" 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:nickm@studioweb.com]
Gesendet: Montag, 3. September 2001 19:24
An: james-user@jakarta.apache.org
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: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: Disabling javax.mail.SendFailedException: 552 Too many receipts
Posted by Serge Knystautas <se...@lokitech.com>.
Again, James doesn't have this feature (552 Too many recipients).
Check what's running on the server that you're sending the message to... and
either send a message to the support group of that mail server product to
see if there's a way around the 552 woes, or install a copy of James to be
your SMTP server and be care free.
Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "Nick" <ni...@studioweb.com>
To: <ja...@jakarta.apache.org>
Sent: Tuesday, September 04, 2001 1:41 AM
Subject: Re: Disabling javax.mail.SendFailedException: 552 Too many receipts
> Hi,
>
> Using Bcc is my plan but whether you send Bcc or Cc there seems to be a
> limit for the most part that I can't seem to avoid with most SMTP servers.
> So now I have to come up with a batching routine so I can send the emails
> out in 100 email blocks. 100 seems to be the limit before I get a 552.
>
> I not at all familiar with the org.apache.mailet and so I don't know if I
> really need it. I was hoping to just tell the SMTP server to let me send
> unlimited emails. That would make my life easier.
>
> Thanks,
>
> Stefan
> ----- Original Message -----
> From: "Serge Knystautas" <se...@lokitech.com>
> To: <ja...@jakarta.apache.org>
> Sent: Monday, September 03, 2001 2:16 PM
> Subject: Re: Disabling javax.mail.SendFailedException: 552 Too many
receipts
>
>
> > You can send a message to multiple recipients without including the
other
> > recipients in the headers. Email client software will call it BCC, and
if
> > you're generating the SMTP message yourself, you do whatever you want
> > (message headers can be completely unrelated to delivery information,
> hence
> > the difficulties in stopping spammers)
> >
> > Serge Knystautas
> > Loki Technologies
> > http://www.lokitech.com/
> > ----- Original Message -----
> > From: "Labib Iskander, Marcus" <ml...@cm-ag.de>
> > To: <ja...@jakarta.apache.org>
> > Sent: Monday, September 03, 2001 2: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='list1@mysite.com'" 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:nickm@studioweb.com]
> > Gesendet: Montag, 3. September 2001 19:24
> > An: james-user@jakarta.apache.org
> > 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: james-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: Disabling javax.mail.SendFailedException: 552 Too many receipts
Posted by Nick <ni...@studioweb.com>.
Hi,
Using Bcc is my plan but whether you send Bcc or Cc there seems to be a
limit for the most part that I can't seem to avoid with most SMTP servers.
So now I have to come up with a batching routine so I can send the emails
out in 100 email blocks. 100 seems to be the limit before I get a 552.
I not at all familiar with the org.apache.mailet and so I don't know if I
really need it. I was hoping to just tell the SMTP server to let me send
unlimited emails. That would make my life easier.
Thanks,
Stefan
----- Original Message -----
From: "Serge Knystautas" <se...@lokitech.com>
To: <ja...@jakarta.apache.org>
Sent: Monday, September 03, 2001 2:16 PM
Subject: Re: Disabling javax.mail.SendFailedException: 552 Too many receipts
> You can send a message to multiple recipients without including the other
> recipients in the headers. Email client software will call it BCC, and if
> you're generating the SMTP message yourself, you do whatever you want
> (message headers can be completely unrelated to delivery information,
hence
> the difficulties in stopping spammers)
>
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
> ----- Original Message -----
> From: "Labib Iskander, Marcus" <ml...@cm-ag.de>
> To: <ja...@jakarta.apache.org>
> Sent: Monday, September 03, 2001 2: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='list1@mysite.com'" 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:nickm@studioweb.com]
> Gesendet: Montag, 3. September 2001 19:24
> An: james-user@jakarta.apache.org
> 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: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
RE: addfooter revisited
Posted by Brady Moritz <br...@moritzdesigns.com>.
Id have to check, but I think I added the savechanges. Ill look for this
though. Thanks again.
Brady
-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Wednesday, September 05, 2001 9:15 AM
To: james-user@jakarta.apache.org; brady@moritzdesigns.com
Subject: Re: addfooter revisited
Ah, I bet I know what the problem is here. In JavaMail when you're changing
multipart content, you have to call saveChanges() on the mimemessage for the
changes to take effect. The new version of James is now doing this
automatically (so the mailet you're looking at doesn't have it), and you're
running this in the older version of James.
Hopefully all my assumptions are correct and this'll fix things for you.
Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "Brady Moritz" <br...@moritzdesigns.com>
To: <ja...@jakarta.apache.org>
Sent: Tuesday, September 04, 2001 1:39 AM
Subject: addfooter revisited
> Serge- Ive been playing with the AddFooter mailet and it looks promising.
> Ive made a few modifications to it so far as well. Ive noticed that no
> footers are added to any emails I send that are forwards of or replies to
> another message, do you know offhand if this is done purposefully or if it
> is just gnerating a message that the mailet doesnt handle? I havent had
the
> chance to go back and investigate this, seems what I was finding before
was
> that it created multi-level multi-part messages that the mailet did not
> handle correctly.
>
> Thanks
>
> Brady Moritz
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: addfooter revisited
Posted by Serge Knystautas <se...@lokitech.com>.
Ah, I bet I know what the problem is here. In JavaMail when you're changing
multipart content, you have to call saveChanges() on the mimemessage for the
changes to take effect. The new version of James is now doing this
automatically (so the mailet you're looking at doesn't have it), and you're
running this in the older version of James.
Hopefully all my assumptions are correct and this'll fix things for you.
Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "Brady Moritz" <br...@moritzdesigns.com>
To: <ja...@jakarta.apache.org>
Sent: Tuesday, September 04, 2001 1:39 AM
Subject: addfooter revisited
> Serge- Ive been playing with the AddFooter mailet and it looks promising.
> Ive made a few modifications to it so far as well. Ive noticed that no
> footers are added to any emails I send that are forwards of or replies to
> another message, do you know offhand if this is done purposefully or if it
> is just gnerating a message that the mailet doesnt handle? I havent had
the
> chance to go back and investigate this, seems what I was finding before
was
> that it created multi-level multi-part messages that the mailet did not
> handle correctly.
>
> Thanks
>
> Brady Moritz
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
addfooter revisited
Posted by Brady Moritz <br...@moritzdesigns.com>.
Serge- Ive been playing with the AddFooter mailet and it looks promising.
Ive made a few modifications to it so far as well. Ive noticed that no
footers are added to any emails I send that are forwards of or replies to
another message, do you know offhand if this is done purposefully or if it
is just gnerating a message that the mailet doesnt handle? I havent had the
chance to go back and investigate this, seems what I was finding before was
that it created multi-level multi-part messages that the mailet did not
handle correctly.
Thanks
Brady Moritz
---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org
Re: Disabling javax.mail.SendFailedException: 552 Too many receipts
Posted by Serge Knystautas <se...@lokitech.com>.
You can send a message to multiple recipients without including the other
recipients in the headers. Email client software will call it BCC, and if
you're generating the SMTP message yourself, you do whatever you want
(message headers can be completely unrelated to delivery information, hence
the difficulties in stopping spammers)
Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "Labib Iskander, Marcus" <ml...@cm-ag.de>
To: <ja...@jakarta.apache.org>
Sent: Monday, September 03, 2001 2: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='list1@mysite.com'" 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:nickm@studioweb.com]
Gesendet: Montag, 3. September 2001 19:24
An: james-user@jakarta.apache.org
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: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org