|
|
Comments and Discussions
|
|
 |

|
I'll really learn from this. Kudos man!
|
|
|
|

|
Hi Rohit,
Awesome article,
I am unable to find the Message body while fetching the email based on the message UID.
Kindly do let me know whether message body is in encrypted format or it is not fetching the same.
Message UID[]:174
Fetch Body:[false]true
IMAP004 UID FETCH 174 BODY[HEADER]
* 109 FETCH (BODY[HEADER] {1264}
MIME-Version: 1.0
Received: from SIXPRD0211HT002.apcprd02.prod.outlook.com (10.255.38.165) by
HKXPRD0210HT002.apcprd02.prod.outlook.com (10.255.5.165) with Microsoft SMTP
Server (TLS) id 14.16.257.4; Thu, 17 Jan 2013 12:50:20 +0000
Received: from SIXPRD0211MB443.apcprd02.prod.outlook.com ([169.254.3.223]) by
SIXPRD0211HT002.apcprd02.prod.outlook.com ([10.255.38.165]) with mapi id
14.16.0257.004; Thu, 17 Jan 2013 12:50:20 +0000
From: sdfsdf
To: SDFsdf
CC: sdfsdfsdf
Subject: Regarding Call
Thread-Topic: Regarding Call
Thread-Index: Ac30sTTbHCu6LpNPTMqblRRGClmd/Q==
Date: Thu, 17 Jan 2013 12:50:19 +0000
Message-ID:
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 04
X-MS-Exchange-Organization-AuthSource:
SIXPRD0211HT002.apcprd02.prod.outlook.com
X-MS-Has-Attach:
X-MS-Exchange-Organization-SCL: -1
X-MS-TNEF-Correlator:
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
UID 174 FLAGS (\Seen))
IMAP004 OK FETCH completed.
IMAP005 UID FETCH 174 BODYSTRUCTURE
* 109 FETCH (BODYSTRUCTURE ("text" "html" ("charset" "iso-8859-1") NIL NIL "quot
ed-printable" 3342 79 NIL NIL "en-US" NIL) UID 174)
IMAP005 OK FETCH completed.
|
|
|
|

|
Hello Rohit
Is InterIMAP Library project always in course ?
It's work well but for most of the mail, attachment file name is not the real one but things like 0FB6C3935BF49BEDB41EA27EBE751@eurprd06.prod.outlook.com.
Did you do correction around that ?
Best regards
|
|
|
|

|
No, someone fork from this and created InterImap but don't know the state.
If you have any issues, do let me know and I can provide the fix.
|
|
|
|

|
Hi,
the re-login in Restore(bool) is done without the ssl flag. I assume the line should look like:
Login(m_sHost, m_nPort, m_sUserId, m_sPassword, m_bSSLEnabled);
regards,
Michael
|
|
|
|

|
Thanks. I will fix it and upload new version.
|
|
|
|

|
Hi, your library goes very well for my account xxxxxx@gmail.com, but if I try with yyyyy@domain.com, hosted by GMail, this doesn't work.
If I use the same params in Thunderbird (imap.gmail.com, SSL, port 993) it works
Obviusly I have activated the IMAP access on GMail configuration panel.
Someone can help me?
Thanks!
|
|
|
|

|
I resolve...
The problem was the password, something like: (Aaaaa0000)
I change the password, and all is fine...
|
|
|
|
|

|
Hi! I went through Joshi.Utils.Imap.Imap classes...You have done good work. I'm new to this kind of programming and I wondered if it is possible to get the subjectName and mailDate somewhere in those methods. I want to search through emails particularly on subjectfield and email sent date.
Thanking you
With Regards
Sofi
|
|
|
|
|

|
Hi!
Does it function well with webclient - Exchange server 2003. When I tried to login- like "test.Login("imap.nordicpim.com", "110", "xxx@xxxx.com", "xxxx")" I get errorMsg "Failed authenticating the user/password in the IMAP server". I know that username and password is correct.
Thanks
|
|
|
|

|
Unfortunately, I don't have access to exchange server 2003. If you can send me error details, I can check what's problem.
|
|
|
|

|
Can you provide some examples of SearchMessage?
Like:
-searching on header and body at the same time
-searching on unread messages only
Good work!
|
|
|
|

|
See the below commands supported for IMAP protocol for search
FROM "<mailaddress>" Mail from that sender FROM "user@example.org"
TO "<mailaddress>" Mail to that recipient TO "user@example.org"
SINCE <date> Mail received after this date SINCE 1-Nov-2009
BEFORE <date> Mail received before this date BEFORE 1-Nov-2009
DELETED Mails marked as deleted DELETED
SUBJECT <string> Mails containing string in the subject SUBJECT "Proposal"
BODY <string> Mails containing string in the body BODY "Hello Greg"
NOT <key> Mails which do not match the key NOT FROM "user@example.org"
OR <key1> <key2> Mails which match either of key1 or key2 OR FROM "user@example.org" FROM "user2@example.org"
|
|
|
|

|
Hi, verry useful library
I need to save email to sent items box
Someone have some info about append command
Thank
|
|
|
|

|
Hi
I found this nice library a few days ago. I love its simplicity in achieving such a complicated task!
When I tried to issue the STORE command to set the SEEN flag, a read-only error occur.
Below was the screen output during my trial:
Warning:* OK Gimap ready for requests from 203.2.94.202 i4if9061028oac.120
Warning:IMAP001 CAPABILITY
Warning:* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH AUTH=XOAUTH2
Warning:IMAP001 OK Thats all she wrote! i4if9061028oac.120
Warning:
Warning:IMAP002 LOGIN user@gmail.com thispassword
Warning:* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE
Warning:IMAP002 OK user@gmail.com Michael Mak authenticated (Success)
Warning:
Warning:IMAP003 EXAMINE INBOX
Warning:* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
Warning:* OK [PERMANENTFLAGS ()] Flags permitted.
Warning:* OK [UIDVALIDITY 661234706] UIDs valid.
Warning:* 1 EXISTS
Warning:* 0 RECENT
Warning:* OK [UIDNEXT 250] Predicted next UID.
Warning:IMAP003 OK [READ-ONLY] INBOX selected. (Success)
Warning:
Warning:IMAP004 UID SEARCH UNSEEN
Warning:* SEARCH 249
Warning:IMAP004 OK SEARCH completed (Success)
Warning:
Unseen Messages: 1
Warning:IMAP005 UID STORE 249 -FLAGS \SEEN
Warning:IMAP005 NO STORE attempt on READ-ONLY folder (Failure)
Warning:
Would there be any mistake I've made?
Thnx
SMak
|
|
|
|

|
Thanks for the complement!!
If you look at the command IMAP003 EXAMINE INBOX which means you are just examining the folder and can't change.
Use SELECT instead of EXAMINE and should work fine.
|
|
|
|
|

|
i Think I am getting closer and closer to solution on my own I am now getting the following error
Failure bodystructure command
My Code is
Dim oImap As New Imap
Dim sHost As String = "imap.gmail.com"
Dim sPort As String = "993"
Dim bSSL As Boolean = True
Dim sUser As String = "ffff"
Dim sPwd As String = "wwwww"
oImap.Login(sHost, Convert.ToUInt16(sPort), sUser, sPwd, bSSL)
oImap.SelectFolder("INBOX")
Dim str As String
Dim saArray As New ArrayList
Dim strSearch(0) As String
strSearch(0) = "1"
oImap.SearchMessage(strSearch, False, saArray)
For Each str In saArray
If str.Length > 0 Then
Dim sFileName As String = str + ".xml"
Dim oXmlWriter As New XmlTextWriter(sFileName, System.Text.Encoding.UTF8)
oXmlWriter.Formatting = Formatting.Indented
oXmlWriter.WriteStartDocument(True)
oXmlWriter.WriteStartElement("Message")
oXmlWriter.WriteAttributeString("UID", str)
oImap.FetchMessage(str, oXmlWriter, True)
oXmlWriter.WriteEndElement()
oXmlWriter.WriteEndDocument()
oXmlWriter.Flush()
oXmlWriter.Close()
End If
Next
|
|
|
|

|
I am getting there error Failure fetching message from IMAP folder/mailbox. BODY[HEADER]
my code is as below
Dim oImap As New Imap
Dim sHost As String = "imap.gmail.com"
Dim sPort As String = "993"
Dim bSSL As Boolean = True
Dim sUser As String = "xcxvxvx"
Dim sPwd As String = "rtrtrtrtr"
oImap.Login(sHost, Convert.ToUInt16(sPort), sUser, sPwd, bSSL)
oImap.SelectFolder("INBOX")
Dim i As Integer
Dim saArray As New ArrayList()
Dim strSearch(0) As String
strSearch(0) = "1"
oImap.SearchMessage(strSearch, False, saArray)
For i = 0 To saArray.Count - 1
Dim sFileName As String = saArray(i) + ".xml"
Dim oXmlWriter As New XmlTextWriter(sFileName, System.Text.Encoding.UTF8)
oXmlWriter.Formatting = Formatting.Indented
oXmlWriter.WriteStartDocument(True)
oXmlWriter.WriteStartElement("Message")
oXmlWriter.WriteAttributeString("UID", saArray(i))
oImap.FetchMessage(saArray(i), oXmlWriter, True)
oXmlWriter.WriteEndElement()
oXmlWriter.WriteEndDocument()
oXmlWriter.Flush()
oXmlWriter.Close()
Next i
|
|
|
|

|
this is a sample of my code
Sub Main()
Dim oImap As New Imap
Dim sHost As String = "imap.gmail.com"
Dim sPort As String = "993"
Dim bSSL As Boolean = True
Dim sUser As String = "xx"
Dim sPwd As String = "xxxxxxx"
oImap.Login(sHost, Convert.ToUInt16(sPort), sUser, sPwd, bSSL)
oImap.SelectFolder("INBOX")
Dim i As Integer
Dim saArray As New ArrayList()
Dim strSearch(0) As String
strSearch(0) = "trustaldo"
oImap.SearchMessage(strSearch, False, saArray)
For i = 0 To saArray.Count - 1
Dim sFileName As String = saArray(i) + ".xml"
Dim oXmlWriter As New XmlTextWriter(sFileName, System.Text.Encoding.UTF8)
oXmlWriter.Formatting = Formatting.Indented
oXmlWriter.WriteStartDocument(True)
oXmlWriter.WriteStartElement("Message")
oXmlWriter.WriteAttributeString("UID", saArray(i))
oImap.FetchMessage(saArray(i), oXmlWriter, True)
oXmlWriter.WriteEndElement()
oXmlWriter.WriteEndDocument()
oXmlWriter.Flush()
oXmlWriter.Close()
Next i
End Sub
Failure searching IMAP with the given criteria. IMAP004 BAD Could not parse command
|
|
|
|

|
Hello,
I am trying to fetch a simple email from Gmail. I am using
oImap.FetchMessage(sUid, oXmlWriter, true);
with the proper uid but the email is returned without its body.
This is the email body (copied and pasted from the email itself) :
"Your New Password is: ######
Your Customer Number is: 507879072
Web Site: http://www.012Bill.Net"
And the email message in my app is :
e@gmail.com
by 10.58.190.194 with SMTP id gs246vec; Sat, 1 Sep 201201:47:31 -0700 (PDT)
by 10.180.97.33 with SMTP id dx1mr019wib.18.134651388; Sat,01 Sep 2012 01:47:31 -0700 (PDT)
<Info@012.net>
from mtaout22.012.net.il (mtaout22.012.net.il. [80.179.55.172]) bymx.google.com with ESMTP id r49si9250693wed.63.2012.09.01.01.47.30; Sat, 01Sep 2012 01:47:31 -0700 (PDT)
neutral (google.com: 80.179.55.172 is neither permitted nordenied by best guess record for domain of Info@012.net)client-ip=80.179.55.172;
mx.google.com; spf=neutral (google.com: 80.179.55.172is neither permitted nor denied by best guess record for domain ofInfo@012.net) smtp.mail=Info@012.net
from conversion-daemon.a-mtaout22.012.net.il bya-mtaout22.012.net.il (HyperSendmail v2007.08) id<0M9N00I00XDLRL00@a-mtaout22.012.net.il> for elain@gmail.com; Sat, 01Sep 2012 11:46:03 +0300 (IDT)
from webapp ([80.179.32.81]) by a-mtaout22.012.net.il (HyperSendmailv2007.08) with ESMTP id <0M9N00IPFXOJAE80@a-mtaout22.012.net.il> forelaklin@gmail.com; Sat, 01 Sep 2012 11:46:03 +0300 (IDT)
Sat, 01 Sep 2012 11:47:11 +0300
012 <Info@012.net>
New password from 012 Bill
elanklin@gmail.com
<0M9N00IQ2XORAE80@a-mtaout22.012.net.il>
1.0
text/html; charset=us-ascii
quoted-printable
TEXT/HTML; CHARSET="us-ascii"
QUOTED-PRINTABLE
223
Can you please help?
Thanks a lot and great job!!
Elad
|
|
|
|
|

|
What this a complement by reducing the one star
Thanks!!
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
IMAPLibrary supports the basic IMAP protocol functions to fetch messages from the mailbox.
| Type | Article |
| Licence | MPL |
| First Posted | 16 Aug 2004 |
| Views | 567,257 |
| Downloads | 13,982 |
| Bookmarked | 161 times |
|
|