NetTalk E-Mail > E-Mail - Ask For Help

How do I FWD a copy of email received?

(1/1)

Alan Telford:
I currently use nettalk to clear a POP3 account (and then process attachments).

I need to continue doing this, but also FWD a copy of all email to another email address.

How do I do this?
Any hints?

Mike Grigsby:
Alan, I have the same issue, and just haven't had time to look into it. But I thought I'd share an idea I'm going to explore:

I think, instead of trying to send multiple emails from a particular page, I'm going to dump the emails into a file queue and let them get processed out using the main frame's timer to search for emails and send them. That way I only have to add the info to a file, not add the email stuff to an individual procedure.

seancameron:
Forwarding an email with NetTalk is actually very simple.

You need two objects:

NetEmailReceive - to retrieve the email
NetEmailSend - to send the email on (forward it).

Each time an email is received and processed you set the properties of the NetEmailSend object using the properties of the NetEmailReceive Object. You can also prepend "FW: " to the subject and modify the body to indicate a forwarded mail if desired. Once you have assigned the data you send the mail normally calling the .Send() method.

The other alternative is to store all incoming mail in a table, and have a separate thread that processes the table periodically and forwards any mail that has not yet been sent. Both approaches work well.

Navigation

[0] Message Index

Go to full version