I'm trying to adhere to https://www.amazon.com/gp/help/customer/display.html/ref=hp_pdoc_main_short_us?nodeId=200767340&ref_=pe_1825130_138612630
I have text stored as HTML in the database. I sent an attachment using sendgrid to username#kindle.com, but Amazon refuses to recognize this attachment as a HTML file. I don't know what to do.
var body = {
subject: book.title + " test Original",
personalizations:
[{
to: [{email: to,}]
}],
content: [{type: "text/plain", value: book.title + " book summary"}],
from: {email: 'info#test.com', name: 'test Team'},
attachments: [
{
filename: book.id + ".html",
content: btoa(book.body),
type: 'text/html',
disposition: 'attachment'
}
]
};
this._sendEmail(body);
I'm trying to send HTML documents to user's kindles to be read on their kindle.
I get this error from amazon
The Kindle Personal Document Service can convert and deliver the following types of documents:
Microsoft Word (.doc, .docx)
Rich Text Format (.rtf)
HTML (.htm, .html)
Text (.txt) documents
Archived documents (zip , x-zip) and compressed archived documents
Mobi book
Images that are of type JPEGs (.jpg), GIFs (.gif), Bitmaps (.bmp), and PNG images (.png).
Adobe PDF (.pdf) documents are delivered without conversion to Kindle DX, Second Generation and Latest Generation Kindles.
Adobe PDF (.pdf) can be converted to Kindle format and delivered on an experimental basis.
If the document that failed belonged to one of the above document types, please ensure the document is not password protected or encrypted. Note that the Latest Generation Kindles support password protected PDFs.
Helpful tips for personal document attachments:
The file size of each attached personal document should be less than 50MB (before compression in a ZIP file)
The email submitted should not contain more than 25 attached personal documents
You can learn more about transferring personal documents to your Kindle in our help pages:
http://www.amazon.com/kindlepersonaldocuments/
If you would like immediate assistance, please contact customer support at +1-866-321-8851 (US customers) or +1-206-266-0927 (International Customers).
Sincerely,
Amazon Kindle Support
Please Note: This e-mail was sent from a notification-only address that cannot accept incoming e-mail. Please do not reply to this message.
Learn more about Amazon Kindle
Check out the Kindle Store
If you have further questions about Kindle, please visit the Amazon Kindle Help pages
The Help pages will provide you with answers to common questions and provide you with a direct link to Amazon Kindle specialists.
To contact Amazon Kindle Customer Service, simply click a button in the Contact Us box on the Help pages to receive assistance by e-mail or phone.
Reading your personal documents on Kindle is now easier than ever. Learn more about "Send to Kindle" at www.amazon.com/sendtokindle
Related
I'm building a website where people can buy songs, and when they do, they get an email with the song in attachments
I'm using Nodemailer for that with that "attachments" option
attachments: [
{
filename: req.body.purchasedSongName,
path: path.join(__dirname, `../uploads/prods/songs/${req.body.purchasedSong}`),
contentType: 'audio/mpeg'
}
]
The problem is that when the song is too large (25MB+ apparently) Gmail gives me an error:
Error: Message failed: 552-5.2.3 Your message exceeded Google's message size limits.
What solutions do I have to fix that?
Simple: Don't send the file via email.
Instead, just send a link from where your users can download the song. You could also implement a system where one download link is usable exactly once, or for a limited time.
I am having problems trying to send customized PDFs from Google Drive to users on WhatsApp using Twilio’s API.
I am using node.js and the documents are created in Google Sheets and stored in Google Drive.
client.messages
.create({
mediaUrl:['https://drive.google.com/uc?id=INSERT_FILE_ID&export=download'],
from: 'whatsapp:+14155238886',
body: `It's taco time!`,
to: 'whatsapp:+15017122661'
})
.then(message => console.log(message.sid));
I thought it would be possible to send the PDF by passing the PDF’s Drive link through MediaURL as that is what is recommended on Twilio’s site for sending media (Images, .mp3’s and PDF’s) but when I try that it doesn’t work.
NB: it works when I try image URL’s etc.
I have tried sending the webContentLink of the PDF that also doesn’t work.
example: how the pdf should look when sent
I do not want to send the user a normal link for them to leave WhatsApp.
Any help with this or any other method to achieve this would be greatly appreciated.
Twilio will check the content-type of the file which you have been passing in the mediaUrl parameter. Twilio will reject if the content-type headers of your media attachment do not match the file extension (for example, content-type is image/jpg but the file extension is .png). It specified in the following links specifies:
Twilio Troubleshooting
Twilio supported-mime-types
I'm trying to create a new envelope via api, but getting the following error message:
<errorDetails xmlns=""http://www.docusign.com/restapi"" xmlns:i=""http://www.w3.org/2001/XMLSchema-instance"">
<errorCode>UNABLE_TO_LOAD_DOCUMENT</errorCode>
<message>Unable to load the document. Unable to load Document(XXXXX.pdf).
Error: Value must be non negative. & vbLf & "Parameter name: Height</message>
</errorDetails>
Could you help with the problem? Not sure why it's happening.
Since the PDF worked when you uploaded it to DocuSign via the DocuSign web tool, the problem lies in how you uploaded it via the API.
When uploading via the API:
Set the fileExtension attribute to "pdf" or whatever the source format is. Eg "html", "docx", etc.
Set the documentBase64 attribute to the BASE64 encoded value of your source document.
I suggest you examine the code example for your preferred language to see how this is done:
C#,
PHP,
Java,
Node.js,
Python,
Ruby,
Curl (direct API)
Look at how scenario 1 or 2 reads and then uploads the source document to DocuSign.
If your document is larger than 15MBytes or so, you may want to upload to DocuSign using a binary transfer technique. To do so, see the examples' scenario number 10.
NodeJS BotBuilder SDK version: 3.15.0
My code:
var pdf = {
name: '<file_name>.pdf',
contentType: 'application/pdf',
contentUrl: '<https url to public pdf file>'
};
var reply = new builder.Message(session).addAttachment(pdf);
session.send(reply);
This code is the same in few online examples. The issue I have is that I always get error:
Error: POST to 'https://smba.trafficmanager.net/emea/v3/conversations/a%3A1TwHmhoGuZP2Mf9P0TTnjv8HkcaXzEHryv0sYCvDDUI-qrMitJtHRlAnIcedcDH_v3IfMBXtg_zo5MDVcS0-8hDCQ4sJzpJhrewBPK8uWJXYeShgmd-s7uh5o8kW4ebAP/activities/1543588440246' failed: [400] Bad Request
For image/png this code works fine.
What I want to achieve is this: (image is taken from Bot Framework Emulator)
File from the web sent from bot to user
The file is sent from bot without uploading it to users's one drive.
This works also when I tested the feature in test section of https://dev.botframework.com/bots. It doesn't work only in ms teams.
The behaviour for sending files can differ per channel. Microsoft Teams doesn't support the direct upload method, like the WebChat / Emulator does. This is due to compliance reasons, as Bill Bliss stated.
You can post messages with card attachments referencing existing SharePoint files using the Microsoft Graph APIs for OneDrive and SharePoint. Using the Graph APIs requires obtaining access to a user's OneDrive folder (for personal and groupchat files) or the files in a team's channels (for channel files) through the standard OAuth2 authorization flow. This method works in all Teams contexts.
Have a look at Send and receive files through your bot
for the full documentation and how to implement.
An alternative option would be to use an AdaptiveCard where you can use an image thumbnail of the document combined with a button to directly download the PDF file from your public accessible URL.
I'm trying to write a script that uses the gmail API to forward messages from my inbox to new recipients.
This guide recommends sending the base64 encoded string for the e-mail. Presumably, I could get the existing e-mail using the get method with format=raw, edit the base64 encoding to change the recipients, and send the new message along.
The messages I'm sending are quite large (many attachments), so this process (of downloading a massive base64 string, decoding it, doing some regex substituion, re-encoding it, and then re-uploading it) will take a long time. It also seems very cumbersome to use regex to manipulate a MIME email message.
It seems that there should be an easier way...? Perhaps some way to do this directly via the API?
Try to use the MailApp.sendEmail(). You can use that script to send to multiple receivers so sending messagees to many people wont be that cumbersome.
// Send an email with two attachments: a file from Google Drive (as a PDF) and an HTML file.
var file = DriveApp.getFileById('1234567890abcdefghijklmnopqrstuvwxyz');
var blob = Utilities.newBlob('Insert any HTML content here', 'text/html', 'my_document.html');
MailApp.sendEmail('a#example.com,b#example.com,c#example.com', 'Attachment example', 'Two files are attached.', {
name: 'Automatic Emailer Script',
attachments: [file.getAs(MimeType.PDF), blob]
});
If you want additional samples, try this SO thread.