Nikhil,
First, you can get rid of the RSET commands as they are doing nothing (but
they can stay, too!).
Second, check the IMail logs to see if your code is really doing what you
think it is. I suspect that will show sending to the same user multiple
times.
Have you removed the IMail Lists? You no longer need them (at least those
that are replaced by your code).
Sort of sounds like your code is not working correctly when it is getting
the 'next' address, or going through the loop more than once.
Daniel Donnelly
________________________________________________________
----- Original Message -----
From: "Nikhil Goyal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 24, 2001 11:01 AM
Subject: [IMail Forum] mailing lists
> Hello people,
>
> I am running IMail 5.01 on the office network, and need to regularly send
> mails to our multiple mailing lists.
>
> Recently we upgraded our network to a mySQL database storing the email
> addresses, and anytime I wish to send mail to one list, the (PHP) code
> generates a list of email addresses dynamically. The code now opens a
socket
> on IMail port 25, and sends the body to each recipient, SMTP commands
> detailed below:
>
> HELO xxx
> MAIL FROM: (me)
> RCPT TO: (rcpt 1)
> DATA
> (body)
> .
> RSET
> MAIL FROM: (me)
> RCPT TO: (rcpt 2)
> DATA
> (body)
> .
> RSET
> (and so on)
> QUIT
>
> Now the problem is that the recipients of this list get 2 or sometimes
more
> copies of the email. But it gets stranger. If I am sending mails to two
> lists, the people on the first list get one copy of the email, but the
list
> I send AFTER this gets two copies. Sometimes people have recd 4 copies!
>
> So my question is what am I doing wrong? Or better still, what is the best
> way to send email to a dynamically generated email list?
>
> I'd really appreciate any help,
>
> Nikhil Goyal
>
>
> Please visit http://www.ipswitch.com/support/mailing-lists.html
> to be removed from this list.
>
> An Archive of this list is available at:
> http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
>
Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.
An Archive of this list is available at:
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/