top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Parsing a email attachment over SSL

0 votes

I get a daily email attachment to my Gmail account which I want to automatically download. I found the following Perl script which does just that:

The above script uses the following syntax to search the messages via IMAP:

my @messages = $imap->search(SUBJECT => $today);

In my case, I want to search on two criteria, subject and date. I tried various ways such as:

 my @messages = $imap->search(SUBJECT => $subject, ON => $today);    
 my @messages = $imap->search({SUBJECT => $subject, ON => $today});
 my @messages = $imap->search("SUBJECT => $subject, ON => $today");

but none of these worked. How can I search on multiple criteria using Mail::IMAPClient?

posted Jul 29, 2013 by Mandeep Sehgal

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

The documentation for Mail::IMAPClient says that the search() method arguments are appended to an IMAP SEARCH command. I think if you look at the relevent section of the IMAP RFC ( you'll find some examples similar to what you're doing.

You probably also want to heed the note in the Mail::IMAPClient documentation about how to distinguish a legit search that returns zero hits versus a search that fails.

answer Jul 30, 2013 by Sheetal Chauhan
Similar Questions
0 votes

I have just come across this Webopedia ( ) entry:

"SSL: Short for Secure Sockets Layer, a protocol developed by Netscape or transmitting private documents via the Internet. SSL uses a cryptographic system that uses two keys to encrypt data ˆ’ a public key known to everyone and a private or secret key known only to the recipient of the message. Both Netscape Navigator and Internet Explorer support SSL, and many Web sites use the protocol to obtain confidential user information, such as credit card numbers. By convention, URLs that require an SSL connection start with https: instead of http"

SSL is generally advised for use with browsers and web sites that support it, but as confidential information can be harvested (according to the Webopedia entry anyway), could anybody advise me on using SSL with my bank and similar sites and whether any alternative (and safe) should be considered.

I generally use Tor as well when sending confidential information through emails or through webmail. As I understand it, my bank does not use OpenPGP and would not accept my public gnupg key for decrypting
encrypted transmissions. Short of changing my bank, can anybody give me further advice on which extra measures I can take to be reasonably certain I can prevent sensitive information from being harvested, and the safest way of sending information by email and through websites?

+1 vote

I am writing a simple tool that needs to read the serial number of a remote SSL certificate. I've poked around Google for a bit but can't find anything that fits the bill.

Is this possible in Python? If so, would someone point me in the general direction of how to do it?

0 votes

How to use multiple virtual hosts with a single SSL instance running on the standard https port.

+2 votes

Is there any Bugzilla API to upload and download bug's attachment files with perl script?
I want to write a Perl script to download all the attachment in a specified bug, and save the files to local directory.
Attachment method in Bugzilla::Webservice::Bug seems not to download or upload attachment from or to bug.

+1 vote

What would be the best module available for parsing html?
My intention is to parse html that contains a table of 5 columns and any number of rows, and have a hash ref like $html->{1}->{col1}=data11, $html->{1}->{col2}=data12 ...$html->{2}->{col1}=data21, $html->{2}->{col2}=data22...etc
Would there be an existing module that can do this without too much effort on my part?

Useful Links with Similar Problem
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.