how to remove attachment
Posted: Sun Mar 23, 2008 2:14 am
I have a program to run through a database data which has email address and a filename for the email address.
The task is to attach the file as specified in the filename to the email address.
I am having problem with my program where by it attached 1 file for the first email, 2 files for the 2nd and 3 files for the 3rd. Obviously, the problem comes from the fact that files kept on being added to the message but the old file for previous email wasn't removed.
So my question is, how do i remove the other files that I attached earlier for other emails.
I have a loop to run through all email address
prepare message
loop while still have email address to send
attach file for this email
send out email
end
what i need is to remove the attachment after i sent out the email, but how do i achieve that?
Thanks in advance
Kelvin
The task is to attach the file as specified in the filename to the email address.
I am having problem with my program where by it attached 1 file for the first email, 2 files for the 2nd and 3 files for the 3rd. Obviously, the problem comes from the fact that files kept on being added to the message but the old file for previous email wasn't removed.
So my question is, how do i remove the other files that I attached earlier for other emails.
I have a loop to run through all email address
prepare message
loop while still have email address to send
attach file for this email
send out email
end
what i need is to remove the attachment after i sent out the email, but how do i achieve that?
Thanks in advance
Kelvin