java – Dificuldade em fazer download de anexo do Gmail usando JavaMail

Tenho esta Classe que verifica a caixa de entrada de uma conta do Gmail. Faço os downloads dos anexos nas mensagens recebidas. Porém quando recebo e-mails de uma conta empresarial(genuína)”noreply@”, não consigo fazer download dos anexos, e se eu enviar de um email meu, por exemplo, baixo sem problemas.

Percebi que nestas mensagens do “noreply”, o e-mail recebido fica com uma indicação de “não encriptado”, com icone em vermelho no Gmail.

Aqui é um caso onte tenho 4 mensagens de e-mail, as três primeiras são as que não consigo fazer o download, e aútima eu consigo. Se puderem me dar algumas instruções para conseguir fazer o download de de todas as mensagens, obrigado.

Não ocorre nenhum tipo de erro, exception, apenas não faz download dos anexos das mensagens recebidas deste “noreply@”. Esta parte do “log” foi onde percebi diferenças entre as mensagens que consigo fazer o download e as que nao.
Mesmo que marque como não lida, e desde a primeira vez que rodo a aplicação já não consigo o download destas.

boundary=        //consigo

boundary="Mark=  //não consigo

Log:

Content    :multipart/MIXED; boundary="Mark=_2020918214536929s+dvJew"
Content    :multipart/MIXED; boundary="Mark=_202091823044286h+hZLxI4"
Content    :multipart/MIXED; boundary="Mark=_2020918233036586AyXZ4CF"
Content    :multipart/MIXED; boundary=00000000000074b8d805afa0fb96

Classe:

import java.io.File;
import java.io.IOException;
import java.util.Properties;

import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.NoSuchProviderException;
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.*;
import javax.mail.internet.MimeBodyPart;

public class MailReader_v01 {

    public static void main(String args()) throws Exception {
        Properties props = System.getProperties();
        props.setProperty("mail.store.protocol", "imaps");
        try {
            Session session = Session.getDefaultInstance(props, null);
            Store store = session.getStore("imaps");
            store.connect("imap.gmail.com", "email@gmail.com", "senha");
            System.out.println(store);

            Folder inbox = store.getFolder("Inbox");
            inbox.open(Folder.READ_ONLY);
            Message messages() = inbox.getMessages();
            for (Message message : messages) {
                System.out.println("Content    :" + message.getContentType());
                System.out.println("Subject    :" + message.getSubject());
                System.out.println("FileName   :" + message.getFileName());
                saveAttachments(messages);
            }

        } catch (NoSuchProviderException e) {
            e.printStackTrace();
            System.exit(1);
        } catch (MessagingException e) {
            e.printStackTrace();
            System.exit(2);
        }

    }

    public static void saveAttachments(Message() messages) throws Exception {

        for (Message msg : messages) {

            if (msg.getContent() instanceof Multipart) {

                Multipart multipart = (Multipart) msg.getContent();

                for (int i = 0; i < multipart.getCount(); i++) {
                    Part part = multipart.getBodyPart(i);
                    String disposition = part.getDisposition();

                    if ((disposition != null)
                            && ((disposition.equalsIgnoreCase(Part.ATTACHMENT)
                            || (disposition.equalsIgnoreCase(Part.INLINE))))) {
                        MimeBodyPart mimeBodyPart = (MimeBodyPart) part;
                        String fileName = mimeBodyPart.getFileName();
                        try {
                            File fileToSave = new File("C:\data\" + fileName);
                            mimeBodyPart.saveFile(fileToSave);
                        } catch (IOException | MessagingException ex) {
                            ex.printStackTrace();
                        }

                    }
                }
            }
        }
    }

}

upgrade – How to download Mojave now that Catalina is available?

I’m still running Mac OS 10.11 El Capitan. I’ve decided to upgrade, but I don’t want to lose 32-bit support, so Catalina is not an option for me.

I found this official Apple page: https://support.apple.com/en-us/HT210190

However, the link on that page to download Mojave (https://itunes.apple.com/us/app/macos-mojave/id1398502828?ls=1&mt=12) doesn’t work for me. (I have iTunes 12.5.1.21.) It only pops up a message from iTunes:

Item Not Available

The item you’ve requested is not currently available in the U.S. store.

How can I upgrade to Mojave?

Download facebook page messenger history

I manage a Facebook page on which we use Messenger quite a lot to interact with our audience. For other tools I’d like to download transcripts of all conversations over time but I cannot find how.

Both Pages and personal accounts have an option to download the data. For pages it’s called “Download your Page information” under General settings. The only difference is that for pages it is not possible to download your messenger transcripts.

What would be an alternative way to go about this and download the transcripts?

multithreading – Java blocking queue download process scenario

I have the following scenario .

I have incoming file download requests and each download is happening in different thread until pool size is exceeded. And after a download completed, a processor processes the downloaded item. So I created the following. I wonder if uses of thread and executors make sense

DownloadTaskProcessor

public class DownloadTaskEnqueuer {
    private static final BlockingQueue<Task> downloadQueue = new LinkedBlockingQueue<>();
    private static final BlockingQueue<Task> processQueue = new LinkedBlockingQueue<>();
    private static final ExecutorService executor = Executors.newCachedThreadPool();

    public void offer(Task task) {
        return downloadQueue.offer(task);
    }

    public void createPool(int size) {
        for (int i = 0; i < size; i++) {
            executor.execute(new DownloadTask(downloadQueue, processQueue);
            executor.execute(new ProcessTask(processQueue));
        }
    }
}

Download task

public class DownloadTask implements Runnable {
    private BlockingQueue<Task> downloadQueue;
    private BlockingQueue<Task> processQueue;
    
    // constructor for initing two queue

    public void offer(Task task) {
        return processQueue.offer(task);
    }
    
    @Override
    public void run() {
        while (true) {
           Task task = downloadQueue.poll();
           if (task != null) {
               task.getDownloadTask().download();
               offer(task);    
           } else {
               // sleep 250 ms 
           }
        }
    }
}

Process task

public class ProcessTask implements Runnable {
    private BlockingQueue<Task> processQueue;
    
    // constructor for initing queue
    
    @Override
    public void run() {
        while (true) {
           Task task = processQueue.poll();
           if (task != null) {
                task.getProcessTask().process();
           } else {
               // sleep 250 ms 
           }
        }
    }
}

Use case (pseudo)

createPool(10);

listener.listen((task) -> {
    downloadTaskEnqueuer.offer(task);
}

Change IBD Location Prior to Download

I’d like to run Bitcoin Core but my laptop can’t handle the load. I have an external drive with enough space, but I’m unsure if/how to change the file destination upon opening the program. Is this possible?

8 – Change data export download link label

The download button is actually rendered from a twig template found at /views_data_export/templates/export-icon.html.twig. This means that you can override it in your theme by copying that file to /themes/YOUR_THEME/templates/export-icon.html.twig and modifying it to what you need.

You can of course put that twig file into any subdir of /templates/ that makes sense to you – e.g. /templates/views_data_export/export-icon.html.twig will work as well.

email – direct link to downloadable content or download page

My client is running a campaign promoting a recent white-paper they published. Users will be driven to a landing page from various sources (mainly mass email and social media posts/ads). The landing page will contain a brief form which is required to complete in order to access the content. Upon filling out the form, the user will receive a “thanks. we just emailed you instructions for accessing the content” message.

So what goes in the email? A direct link to the content? or a link to a web page that says “your download should begin automatically. Click here if it doesn’t”?

I think the path of least resistance is to have the download begin right after the form has been submitted. But it’s been decided that since this is a lead gen campaign that the automated “welcome” email will be of higher value if the user has to actually read it… if they want to access the content.

The email -> landing page -> email -> landing page -> downloaded content flow seems extremely cumbersome to me> but I don’t know that email -> landing page -> email -> direct link to downloadable content (eample.com/white-paper.pdf) is any better. After the download, they’re left with a blank browser window rather than our branding and website.

I suggested the immediate download AND the automated “Welcome” email, but it was nixed. So now I’m trying to choose between the best of 2 less-than-ideal options.

Any thoughts… direct link or link to download page?

man in the middle – How does a person under surveillance safely download tor or tails in a hostile environment?

One of tor’s stated goals is to help individuals such as journalists, activists and whistleblowers protect against surveillance, and in many countries people in those lines of work or activities are usually subject to surveillance, especially targeted surveillance.

Given a scenario in which a journalist working in an environment where he is subject to active targeted surveillance, how would he safely download tor? Assume that the journalist in question is using a new computer with a freshly installed Linux distribution. In what ways could an adversary with man-in-the-middle capabilities affect or compromise the download?

Does using https to download TAILS or the distribution package manager to download tor provide enough security to protect from malicious third-parties?
How can someone in this scenario safely download tor or TAILS?

Where to download Helm Control Panel for Windows reseler hosting RSS

Hi,

Sorry if I am using the wrong forum, but does anybody know where I can download HELM Control Panel for Windows reseller hosting?

I… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1821493&goto=newpost