NetTalk Central

NetTalk E-Mail => E-Mail - Ask For Help => Topic started by: Alan Telford on January 09, 2008, 07:27:52 PM

Title: How do I FWD a copy of email received?
Post by: Alan Telford on January 09, 2008, 07:27:52 PM
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?
Title: Re: How do I FWD a copy of email received?
Post by: Mike Grigsby on January 15, 2008, 08:24:01 AM
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.
Title: Re: How do I FWD a copy of email received?
Post by: seancameron on July 01, 2008, 10:54:44 PM
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.