How to get body of mail by message-ID or any header - search

I'm creating an email app. To save time, I just download subject and some header and saved them to database, not download body of mail.
And then, If user click on subject, I will download body of this mail.
I try to use Message-ID (because it's unique) to make it is an index. and Using this code to find this mail on server
SearchTerm term = new MessageIDTerm(ID);
message_s = folder.search(term);
But it just success on GMAIL, some other server, this code doesn't work correct.
I try to get All message-ID and compare it on client side, It toke a lot of time to find, user can't wait too long to get body of email.
Anyone has an idea to find and download body of email correctly by Message-ID or by any header ?

Related

Mime_content in reply email (exchangelib, python)

First - I use the exchangelib package to connect to EWS exchange.
I will create a reply to the email as follows:
msg = acc.inbox.all().order_by('-datetime_received')[-1]
mgs.reply_all("Re: Subject", "body of email")
But the response created this way doesn't have the mime_content option, which I need to be able to save the email as .eml or .msg.
The msg variable has mime_content.
Is there a way to create an email reply with mime_content?
Thanks a lot!
reply_all() does not return anything. It's just a helper for sending a reply to the email it's called on.
If you want to access the Message item that the reply created, you need to search your "Sent" folder for the reply. That message has the mime_content field you're looking for.
If you call msg.create_reply_all(subject, body).send() instead, then you should get back the ID of the item stored in the "Sent" folder so you don't have to search for it.

Netsuite REST API for email communications

I am trying to find where in the NetSuite REST API the communication messages are stored. I have looked at messages but the list returns 0 even though there are a lot of emails that have been sent. Guessing I'm looking in the wrong place but not sure what path the records are in.
Also once I get the emails, is there a way to extract the attachments sent in the emails to download using the API?
Thanks!
You can execute a SuiteQL query.
POST https://[account].suitetalk.api.netsuite.com/services/rest/query/v1/suiteql
Header: Prefer: transient
Body:
{
"q": "SELECT id, authoremail, subject, datetime FROM message"
}
However, adding the attachments field to the search results to an unexpected error.
The record and field IDS are in the Analytics browser: https://[account].app.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_1/analytics/record/message.html.

I want to send email attachment using nodemailer in node js.i am using elasticemail gate way

I need to send a URL attachment in nodemailer.i try to many ways but mail was not deliverd.I was seen elasticemail gateway they showed a error like this "suppressed" how will i solve this issue
attachments:[{ // use URL as an attachment
filename:'GSTR3B_33ADQFS8223E1ZY_012019_1551501263.pdf',
path:'my url'}]
if you are getting "suppressed" from Elastic Email check in the Contacts section on your dashboard to be sure that the contact is in an "Active" state. The contact might be suppressed by the system.

IFTTT Webhooks - Not receiving email (but the response says that it was sent)

I'm following this tutorial to send email in App Inventor: https://www.hackster.io/taifun/trigger-ifttt-to-send-an-email-using-app-inventor-9df505 (You will have to scroll down on the page to view the tutorial)
The tutorial is straight forward and easy to understand. However, the IFTTT service (Maker) is now called "Webhooks".
I don't know what else has changed since that tutorial was written.
Following the tutorial:
the URL is correct https://maker.ifttt.com/trigger/Sendmail/with/key/*MYKEY*
the RequestHeaders are correct Content-Type: application/json
the PostText is correct: { "value1" : "faeryofiris#gmail.com", "value2" : "test", "value3" : "test body" }
I have double and triple checked for spelling errors.
Once I click a button to send this email, I receive the response:
"Congratulations! You've fired the Sendmail event!"
Except... there is no email. Both emails are my actual emails, so they are valid emails. "faeryofiris#gmail.com" should be the "FROM" email, and "pixiibomb#gmail.com" is the email that is registered on IFTTT (this should be the email that receives a message from faeryofiris) I keep refreshing my gmail, and still... no email.
Any ideas?
I've run into this issue several times. The solution has always been to click "Edit Connection" on the Webhooks Service Settings page. This will get you a new key. It doesn't solve their issue which is that keys tend to die for no explained reason but it should get your setup working again.

user can not sign because there’s no URL created and sent to us from Docusign

We are receiving the following error when I try to create a recipient view. Basically the document is sent to 2 users, one of them has already signed but the other user can not sign because there’s no URL created and sent to us from Docusign. We are using node.js docusign sdk.
var recipientView = new docusign.RecipientViewRequest();
recipientView.setReturnUrl();
recipientView.setUserName();
recipientView.setEmail(;
recipientView.setAuthenticationMethod("email");
recipientView.setClientUserId();
var envelopesApi = new docusign.EnvelopesApi();
envelopesApi.createRecipientView(accountId, envelope.id, recipientView,
function(error, viewUrl, response) {
// no url is returned here.the error (in the image) is shown
});
I printed the values of accountId, envelopeId and those seemed to be fine.I checked if the user had changed his first name, last name and there were no errors there. If I create a new user from scratch everything works fine.
FrontEnd Error
Response Error
Through your screenshots it looks like you are getting an UKNOWN_ENVELOPE_RECIPIENT error returned from the API. This means the recipient data you are sending to identify the recipient is not correct. It needs to exactly match the data you assigned to the recipient when you added them to the envelope, such as name, email, recipientId, and clientUserId.
Try calling the EnvelopeRecipients: List API before you make the request to generate the URL and ensure that the recipient data matches what you are sending in your createRecipientView() request. That should help identify which piece of data is off, once you correct that the call will then start returning the proper URL.
Also see the Embedded Signing features page in the DocuSign Developer Center which shows exactly which params you need to set etc:

Resources