Search The ForumSearch   RegisterRegister  LoginLogin

MailBee SMTP

 AfterLogic Forum : MailBee SMTP
Subject Topic: Mail without attachment Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
itzik
Newbie
Newbie


Joined: 28 August 2006
Location: Israel
Online Status: Offline
Posts: 3
Posted: 29 August 2006 at 3:41am | IP Logged Quote itzik

Hello,

Can I pul a mail to read without it attachment?

Thank you,
Itzik
Back to Top View itzik's Profile Search for other posts by itzik
 
Andrew
AfterLogic Support
AfterLogic Support


Joined: 28 April 2006
Location: United States
Online Status: Offline
Posts: 1189
Posted: 29 August 2006 at 7:38am | IP Logged Quote Andrew

Unfortunately POP3 protocol does not support such feature. However, you can download message partially by specifying the second parameter (BodyLinesCount) to RetrieveSingleMessageHeaders method as follows (in VB6 syntax):

Code:

Dim Mailer, Msg
Set Mailer = CreateObject("MailBee.POP3")
Mailer.LicenseKey = "put your license key here"
Mailer.Connect "mailserver.com", 110, "MyName", "MyPassword"
If Mailer.Connected Then
  If Mailer.MessageCount > 0 Then
    Set Msg = Mailer.RetrieveSingleMessageHeaders(1, 10) ' Also download first 10 lines of body
    If Not Msg Is Nothing Then
      MsgBox "Body preview: " & Msg.BodyText
    End If
  End If
  Mailer.Disconnect
End If


RetrieveHeaders method of POP3 object supports BodyLinesCount parameter too. Thus, you can partially download all the messages in mailbox.


Best regards,
Andrew
Back to Top View Andrew's Profile Search for other posts by Andrew
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide