Author |
|
Guests Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 13 October 2004 at 1:28pm | IP Logged
|
|
|
I have been stuck on something for a few hours and was hoping you could possibly answer my question. I am attempting to use Mailbee to automatically remove bounced emails from a database. I am designing a page that will receive a bounced email and check to verify the subject is "Delivery Status Notification (Failure)." If this is the subject, the application will then search through the message body and extract the email address. It list the record in teh database with a matching email address. After the use selects the checkbox by the record adn clicks the delete button, the records that were checked dissapear from the DB.
My problem is this... Suppose I have 4 bounced emails. I cannot get the page to find 4 addresses. It will only list the first address 4 times. Something is wrong in the way I am using the objects, adn I dont really undestand them very well. I have attached my code. If you can help, I woudl very much appreciate it!
I made the trouble spots red.
Click here for the code
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 13 October 2004 at 9:51pm | IP Logged
|
|
|
The following code may cause error:
strRawEmail = oMailer.RetrieveMessages
'response.write strRawEmail
WordArray = Split(strRawEmail, "failed.")
RetrieveMessages returns collection of messages (it is like the collection returned by RetrieveHeaders method you used in the beginnig of your code).
To get raw body of the email, use something like that:
' I is a number of message to retrieve
Set Msg = oMailer.RetrieveSingleMessage(I)
If Not oMailer.IsError Then
strRawEmail = Msg.RawBody
End If
Now you can search raw body of the email for certain things, split it, etc.
Anyway, MailBee documenation contains an example of handling bounced mails which you can find useful. Currently, it's written to handle bounced mails in CommuniGate mail server format (with "Undeliverable mail" in subject) but it should be easy to adapt it for any other bounce format because all logic specific to bounce format is placed into separate function. You can find this example in MailBee documentation under "Code Samples"/"Receiving e-mails (POP3)"/"Bounced messages (POP3 part)" topic.
Please let me know whether it helped.
Regards,
Alex
|
Back to Top |
|
|
Guests Guest Group
Joined: 10 November 2003
Online Status: Online Posts: 262
|
Posted: 14 October 2004 at 8:46am | IP Logged
|
|
|
Thanks for the help Alex. I apologize for making you answer a question that is in the documentation. I haven't yet purchased the software and didnt realize there was a book included. I have put in a purchase request to buy the software this morning. The literature should make my life a little easier. Thanks for you help.
|
Back to Top |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 14 October 2004 at 9:02am | IP Logged
|
|
|
I meant electronic documenation (.chm file) which comes with MailBee (you can access it from Programs/MailBee/MailBee Objects Documentation menu).
There is no any printed documentation available. I'm sorry if my posting was not clear in this way.
Alex
|
Back to Top |
|
|