In this article, I will explain how to send attachments using AWS SES and this article is for the people who already know how to send a simple email using SES.
SES allows sending attachments only through sendRawEmail method.
sendRawEmail accepts Multipurpose Internet Mail Extensions (MIME) type email body as data, so let's see how to prepare MIME type email content.
Recently I came across two methods of Array prototype I felt like sharing with you all.
This can be used to test array has at least one element of the type we are looking for or not. Suppose if we have an array of integers if you want to know whether it has any negative number or not you can use some() method.
const array = [10, 0, 2, -11, 5, 6];const isNegative = (number) => number < 0;if(array.some(isNegative)) {
// do something
}
The some()
method stops executing when the callback returns true, in the above example…
This is my first post on Medium. I am so happy to share with you how I stopped worrying about async tasks after moving to Kotlin. I don’t want to write about how miserable it is to work on Android AsyncTasks and complication they add.
We’ll be using a library called Anko by Jetbrains. It has many useful utilities which makes an android developer’s life easier. One of them is doAsync. To use this extension function you need to add anko-commons to your build.gradle.
dependencies {
compile "org.jetbrains.anko:anko-commons:$anko_version"
}
After this you can call doAsync{…} from anywhere in activity. If…
Software engineer