User Tools

Site Tools


curl:perform_imap_queries_using_curl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
curl:perform_imap_queries_using_curl [2020/09/25 13:00] 192.168.1.1curl:perform_imap_queries_using_curl [2020/09/25 13:02] (current) 192.168.1.1
Line 36: Line 36:
 Here we see that we've connected, and received a list of folders, including "xen-users", "fairshare", and the "INBOX". Here we see that we've connected, and received a list of folders, including "xen-users", "fairshare", and the "INBOX".
  
-If your mail-server is running over SSL then instead of using **imap://** you should set the schema to **imaps://**, it may be that you're using a self-signed certificate in that case you'd add **--insecure** to avoid checking the certificate trust-chain.+If your mail-server is running over SSL then instead of using **<nowiki>imap://</nowiki>** you should set the schema to **<nowiki>imaps://</nowiki>**, it may be that you're using a self-signed certificate in that case you'd add **<nowiki>--insecure</nowiki>** to avoid checking the certificate trust-chain.
  
 This would look like so: This would look like so:
Line 48: Line 48:
 ===== Discovering Messages ===== ===== Discovering Messages =====
  
-With the previous example we looked at listing mailboxes.  What if we wanted to actually view a message?  To fetch a message we need the identifier of the message to fetch - so we need to find out how many messages exist, as message-IDs are sequential.+With the previous example we looked at listing mailboxes.  What if we wanted to actually view a message? 
 + 
 +To fetch a message we need the identifier of the message to fetch - so we need to find out how many messages exist, as message-IDs are sequential.
  
 To see how many messages exist in the folder "People-Steve" we'd run this: To see how many messages exist in the folder "People-Steve" we'd run this:
Line 134: Line 136:
 The reason for avoiding custom-requests where possible is that when you're using the curl API programatically you'll discover that responses are not decoded - which is a known issue. The reason for avoiding custom-requests where possible is that when you're using the curl API programatically you'll discover that responses are not decoded - which is a known issue.
  
-In the example above we'd have received zero output unless/until we added the **--verbose** flag.  Precisely because curl has received the output from the IMAP-server but not decoded it and presented it to us.+In the example above we'd have received zero output unless/until we added the **<nowiki>--verbose</nowiki>** flag.  Precisely because curl has received the output from the IMAP-server but not decoded it and presented it to us.
  
 ---- ----
curl/perform_imap_queries_using_curl.1601038819.txt.gz · Last modified: 2020/09/25 13:00 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki