TipMail with Content-Transfer-Encoding: 7bit

203 views
Skip to first unread message

victorcas...@gmail.com

unread,
Feb 1, 2021, 5:40:41 AM2/1/21
to Harbour Users
Hello!

I use TipMail() Class to receive emails with attachments. It works well, but if the email is Content-Transfer-Encoding: 7bit, it does not read the attachment, the CountAttachments() method returns 0.

Any ideas?

Thank you!

Shaji Thomas

unread,
Jun 6, 2021, 2:01:41 AM6/6/21
to Harbour Users
Hi,

Can I read email from within Harbour program ?. I am using hb_sendmail() for sending emails. 
I did'nt  get a clear idea about receiving mails using  TipMail()..
Requesting your help..

Jayadev U

unread,
Jun 7, 2021, 1:17:47 AM6/7/21
to harbou...@googlegroups.com

Hi Shaji,

 

If you want to retrieve email from outlook, the following code would work:

 

/* Code start */

Procedure Retrmail

// Import last mail of Outlook 2003-2010 of Inbox folder

   oAttach:=NIL

   oNameSpace := NIL

   oInbox  := NIL

   oOutlook := NIL

 

   cSubject :=""

   cSendername :=""

   dcCreationdate :=ctod("  .  .    ")

   cBody:=""

 

   TRY

 

      oOutlook := CREATEOBJECT( "Outlook.Application" )

 

      oNameSpace   := oOutlook:Get( "GetNameSpace", "MAPI" )

      oInbox    := oNameSpace:Get( "GetDefaultFolder", "6" )  //Inbox Folder

 

      nbr_message:=oInBox:Items:Count  // nbr of messages in Inbox

 

      with object oInbox:Items

         with object :Item(nbr_message)  // access to last mail entered

 

            cSubject:=alltrim(:Subject)

            dCreationdate:=:creationtime

            cSendername:=alltrim(:SenderName)

            cBody:=:Body

 

         end

      end

 

   Catch oError

      oNameSpace := NIL

      oInbox  := NIL

      oOutlook := NIL

   END

RETURN

 

/* code end */

 

·         Not tested.

·         Credit is due to the Author of the program.

 

HTH,

 

Warm regards,

 

Jayadev

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/00e3990e-6f71-4a32-b9d2-c6bfc5d8c3e8n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages