Download links from email - python-3.x

I am trying to download pdf available in email as hyperlinks. The reason I need this is that I get emails with several such links that needs to be downloaded and saved on a location.
Is there a way this could be automated. Tried checking out ways to do it using python or VBA but no viable solutions so far. This is O365 that I need help on and the hyperlink is embedded in the text highlighted in blue..

You should check the smtp,smtpd modules for a direct interaction with the server.
In the smtp server module you could download the mail locally and extract the info directly and locally, it's useful if you want to keep a backup of your mail, and keep clean your inbox.
In the smtp client module, you could read the email, save it as a object and extract the elements with the mime module, the extract (file) should be translated to a file object and/or saved in de pc as a file with it's extension.
Note: you should look in the internet for the configuration of your mail service to connect in the correct way and the correct sequence of steps, because some servers need a validation of the connection before login and others after the login.

Related

React: Is there a way to set up a button clicking on which would trigger opening default email client with PDF document attached to it?

Basically I would like to achieve the following result: on a web page user clicks on a Share button and it opens up his default email client with a PDF with the contents of the page attached to it.
I was think to use a combination of html2canvas and react-pdf to generate a PDF page and attach it to this email that would be opened directly from the client side. Is it something possible to implement, or would I need to do it through the server side, or is it something just generally not possible?
I found some topics about it, like this one, that state that it is only possible to add attachment from the client's machine, not the web (which includes both React client and Node.JS server that I have spinning on AWS EC2 / or something from AWS S3 bucket, I assume), however I feel like I have seen it being implemented on some sites in the past.
Ideally, in future it would be an overlay opening on Share button that would have options to open email / Slack / MS Teams client with that PDF attachment, but for now just focusing on email part.

Automatically add attachmends based on input field

I would like to know if there is a way to automatically add attachments in my PHPMailer script based on the value of input field.
Example:
I have a folder named Stackoverflow.com on my desktop and I would like to add all the attachments from that folder as soon as I type in Stackoverflow.com in my subject input.
No. A script running in a web browser has no direct access to your local files. Many years ago browsers used to allow this, but it (unsurprisingly) turned out to be catastrophically bad from a security perspective. You can select multiple files yourself via a normal file input, but it is up to you to select them, not the code running in the page. Also, this has nothing to do with PHPMailer.

Setting up simple web application service and testing - Linux debian 10

I am doing my assignment given by the lecturer. On the title stated, my idea is about setting up a mail server on the server and we can send the email from the client, all the email is stored in the server virtual machine. Do my idea is correct on this title stated or any recommendations?
Sending mail is not that hard, especially just using (E)SMTP, tcp
text dialogs. Or you can use Linux mail commands.
Storing mail, either locally or accessing mail on a pop or imap server, poses
another set of challenges.
And of course, you need the HTML web pages as well as the services.
Attaching files can be another challenge, both uploading the files
and encoding them for inclusion in the mail.
JAVAScript can make some usual features of email clients easier, like sorting a list of emails in a folder or from a search by a column ascending or descending.
Searching email is an even bigger challenge!

Docusign Connect Configuration settings not returning PDF

I have a standard custom connect setup that has been working really well for us. We now want to store the signed document in our app. So I go and edit the settings and click on Document PDFs in the include section. However, there is no change in the XML that is in the callback. I would have assumed that the base64 encoded document would be there just like when I send it.
Is it somewhere else? Ho do I get a copy of the document once ALL recipients have signed?
Thank You.
Sorry you're having this problem. I suggest creating a new Connect subscription/config and sending it to https://www.webhookapp.com/ as a test.
If the payload is as you expect, then update the url to be your webhook listener.
It could also be that you're not parsing the xml fully. The documents are included at an initial object level within the xml.
I do know that if you request the Certificate of Completion without asking for the Document PDFs themselves, it won't work. I haven't seen your problem as described though.

Outlook REST API - getFolders not returning all folders

I'm just getting started with the Outlook REST API. My baseline is the tutorial that uses node-outlook.
First order of business is to retrieve all of the folders in my mail account.
So I issue this REST request:
GET https://outlook.office.com/api/v2.0/Me/MailFolders
Instead of returning all of my folders, it only returns the "well known" folders:
Clutter
Deleted Items
Drafts
Inbox
Junk Email
Outbox
Sent Items
Trash
Am I missing a query parameter or something that says, "no, really, all of them please"?
UPDATE
I tried a different email account, and I also don't get all of my actual folders, but I get a different subset (some of which are well-known, others aren't).
I am implementing the paging protocol (using the #nextLink parameter) so it's not a matter of page sizes. I am getting these 8 folders on one account, and 18 folders on another.
So there must be something that decides what folders will be returned.
UPDATE 2
I changed to doing a folder sync instead using the "beta" API. In this case, I also get an unnamed folder in the list, which is the parent of the other folders. It comes along with a ChildFolderCount which is accurate. However, when I do a child folder request on that folder id I get the same list.
UPDATE 3
Here's the request url I'm using when I attempt to read the child folders of the one folder that comes back with a non-zero ChildFolderCount.
GET https://outlook.office.com/api/beta/Me/MailFolders/AAMkADRmMzFmNjZmLWU3MjctNGZiNi1iZTg4LTRmNGQwYTVhMDgxYgAuAAAAAAB8IxaZ5KGbQom4EPywGCSdAQDVy0eYwAzLS63k5pohzykCAAAAAAEJAAA=/childfolders
Here's what appears to define what folders are returned by this API and what are not:
If I create a folder in office365 directly on outlook webmail, it shows up in this query.
If I create a folder in Mac Mail, it does not.
Mac Mail accesses the service using EWS, so I would expect a folder created by it would be like any other folder.
So there is something about folders created on Mac Mail that prevents them from being returned by this API.
Folders created in Mac Mail DO show up in web mail and vice versa.
Folders created on an iPhone DO show up, so in my limited testing it looks like Mac Mail may be the only app suffering from this problem. The problem I have is most of my folders were created in Mac Mail and I have no easy way of rebuilding them.
I'm thinking this is just a BUG in the API. At any rate, this answers my original question and should help anyone out there trying to use the new API.
If I find a workaround I'll post it here.

Resources