MailSlurp technical blog from the developers. Posts about email API testing and features added to the platform and new examples.
Do's & Don'ts for Multiple SPF Records SPF is an abbreviation for Sender Policy Framework, and it is used to verify the legitimacy of emails. It is necessary to employ SPF records, which are TXT documents. The following section will discuss how to avoid having frequent SPF difficulties. The topic of the second most frequently encountered error will be the creation of multiple SPF records for a single domain. First rule: One SPF record for one domain In RFC4408, it is explicitly specified that a domain name must not contain multiple records that cause an authorization check to be performed in order for the user to choose multiple records.
Introduction To Mailcatcher Setting up email workflows for your app might be difficult. How do you ensure the right emails are sent to the correct recipients? Do you make them look beautiful on all screen sizes? Some of these can be, to some extent, answered with a tool called Mailcatcher. What is a Mailcatcher? Mailcatcher intercepts emails sent from any web or mobile app. It works as a fake SMTP server where you redirect your messages instead of sending them to a real one.
List-Unsubscribe Header In Email In 2003, a new law concerning email was passed in the United States. CAN-SPAM gave email recipients the right to stop receiving bulk emails they didn't want. This article will discuss a native unsubscribe option, list-unsubscribe, and how to confirm an email. We will also understand what is confirm email means. What is the list-unsubscribe header? The list-unsubscribe field describes the command to unsubscribe users directly. An unsubscribe link or button is displayed next to the email sender's information.
Confirmation Emails That Work What does confirm email mean? Confirmation emails are another type of underestimated transactional message. Survey: 64% of consumers believe purchase confirmations are the most valuable messages in their email inbox. Confirmation emails enjoy a 70% open rate; sending nominal "order confirmed" messages is inexcusable. We will teach you how to confirm an email in the article below. How do confirm emails work? Confirmation emails are sent to confirm user actions and can be implemented with a simple if/then script in your app or as part of your email marketing automation workflow.
GraphQL API disposable email accounts Did you know you can use GraphQL to send and receive emails? That’s right - there is a free API at graphql.mailslurp.com you can use to create disposable email accounts for testing and application development. Create a test project Use NPM to initialize a new node project and add the AVA test library (you can use any test library you wish). npm init ava -y Then add the graphql-request library so we can call the GraphQL endpoints.
Disposable email accounts for DotNET core 6 Building applications in .NET is fun and productive but what do you do when you need to add email integrations or test using disposable email accounts? MailSlurp’s free DotNET SDK client on nuget lets you create real inboxes on demand for sending and receiving emails in C#, F# and more. Installing the latest .NET core 6 DotNET was never known for simple naming conventions.
Couldn’t find any package by glob ‘dotnet-sdk-6.0’ If you encounter errors when install dotnet-sdk on Linux using dpkg or apt-get you may need to purge your microsoft packages like so: sudo dpkg --purge packages-microsoft-prod && sudo dpkg -i packages-microsoft-prod.deb sudo apt-get update Then you can install the dotnet sdk again like so: sudo apt-get update; sudo apt-get install -y apt-transport-https && sudo apt-get update && sudo apt-get install -y dotnet-sdk-6.0
What Is Amazon Simple Storage Service (SES) - And How Can I Use It? Amazon SES is an email service among virtual servers, AI apps, and libraries. Ideally, you can integrate your email system with your program hosted on Amazon. This post explains how Amazon SES differs from other email systems, and how it may be set up and integrated into your architecture. Amazon SES Definition It is a cloud-based email service for mailing commercial and bulk emails.
How To Mask An Email Address Email masking has become more critical than ever before. Whether you wish to secure your email address or those of thousands of your clients, we may have something useful for you. What is email masking? Email masking is altering email addresses to hide the actual data. Usually, a masked email address keeps its original format and can't be easily traced back to the exact address.
Tailwind Print Styles Custom Media Query If you need to a @media print (print stylesheet) for your website and you use Tailwind you can customize the tailwind.config.js to include custom media queries. Use Print stylesheets for printers and PDFs The appearance of a website often differs when printed or saved as a PDF. For that reason it is useful to define CSS styles that only apply to printers or PDFs (or devices that satisfy the @media print media query).
HTML Mailto Links Explained HTML Mailto is uncomplicated to use. This link opens the default email client and adds a new notification maker. Pre-populated fields save time and prevent email bounces. This post will cover customizing mailto. We'll also discuss its viability in this decade. Come on. HTML Mailto fundamentals Because Mailto is a link, you must utilize the ahref property on it. For example, you can send an email when you click a link.
Maximum Email Size and How to Optimize It Email sizes are fundamental for a few important reasons. One is security, and another is the performance of your email. This article covers, in brief, all you need to know when it comes to email sizes, focusing mostly on email file size limits. Why email size limits are used There are three main reasons that there is a max email size set. And they are;
How to choose the right email design size (for various campaigns) Email sizes can be instrumental to determine if your consumer will comprehend and engage with your content. While the template width (600 px) is typical, there are nuances to be mindful of. There are no hard and fast standards for email template height like design blocks. This piece will highlight some of the best email template sizes and explain where they fit best.
SPF Records Explained: What Are They? An SPF record is now required for reliable email delivery. It protects your emails from being faked. This protects you against phishing scams and trollers. TXT is a DNS resource record. It is usually used to notify external sources about the domain. It's required for email security. For example, a server sends an email to your ISP. The ISP can utilize an SPF record to validate the email.
Markdown heading sizes Let’s use markdown to specify headers sizes (h1, h2, h3) and more. What is Markdown? Markdown is a simple format for writing content that can be converted to HTML (and other formats) by a tool of your choice. It is used as it is simpler than writing raw HTML and can be used to manage large content bases without need for a database. Markdown can also be used when sending emails with MailSlurp!
Office Puppy Behold the MailSlurp office puppy Wusi. She is a chihuahau/mini-pinscher mix and she keeps everyone motivated. She is a big believer in email testing and epowering developers to do the best! Wusi’s wish Wusi has communicated that she want every QA tester, marketer, and developer to enjoy the email APIs available free of charge at MailSlurp. Try MailSlurp today.
The Recommended Email size Do you know what the email attachment size limit is to the content you put in your email? Several, if not all, email sending service providers restrict how far the email attachment size should go. The limitations are put because of security reasons as well as performance. For this reason, when considering sending out email notifications or newsletters, you should consider the size of the file attachments and HTML.
The Difference between POP3 Vs. IMAP Emails When it comes to retrieving email messages, you have to do it right. To regain your emails, you need to be intentional which the method you pick on doing so. There are basically two options to choose from, that is POP3 vs. IMAP. They do the same work but vary in so many ways from each other. Here is how POP3/POP POP is initial for Post Office Protocol.
SMTP Port Guide Everyone wants a successful delivery of their email. What stands between desire and real success is the correct port of transmission. You might think that it is not much of your problem because the service provider worries about that. Nevertheless, a default SMTP is no assurance of the best delivery. Therefore, it is essential to learn some other port alternatives that will better deliver your mail. What are SMTP and SMTP Ports and their roles SMTP is initials for Simple Mail Transfer Protocol.
What is an SMTP Server? If you ask anyone whether they can send an email, a good percentage of them will answer in the affirmative. People do not realize that the behind-the-scenes of receiving and sending emails are a technical system. What assists you in sending mail is called a server. A server handles particular services; in this case, an email server deals with mails only. The email server division is into two, the outgoing and the incoming server.
NBSP in HTML emails Of the easiest thing to use on the keyboard, it is the space bar. You can even do it while your eyes are closed. You press the big button at the bottom of your computer keyboard, and space appears. However, it is not as easy as it seems when it comes to HTML code. There are several ways to make the room appear in HTML, one of the ways is  .
What is DKIM Email? Spam messages are not anyone’s favorite. However, to defend those companies, they send them to inform potential customers about their clients. Over time bots have changed how most people and companies send email marketing messages to you. With these bots, companies send emails while impersonating themselves as one of your friends or relatives. When this happens, you are likely to click on the links in the emails.
Email for testing One of the laborious things in QA professional life is testing email workflow. It involves a lot of sweat and labor. There are also the expectations of working with speed plus the possibility of something going wrong. For this reason, several developers have come up with random email generator dummies to assist you in avoiding the hassle. How do dummy emails works It is effortless to generate random emails.
DotNET Core Cake Task Runner (CSharp Makefiles for coverlet code coverage and more) Cake is a free open-source task runner for writing custom cross-platform builds stages for .NET applications. MailSlurp uses Cake to build CSharp SDKs for its free email API. In this tutorial we will show you how to create Cake files and a dotnet tool manifest in order to create custom builds and tasks in your .
CC and BCC in SMTP Numerous questions arise from people asking, what is Bcc in email, and how does it work? They also ask what is cc in an email and how it differs from Bcc. For this reason, here is a short compilation of information on cc and BCC and their role in SMTP (Simple Mail Transfer Protocol). How Cc and Bcc vary in emails Let’s take a look at both cc and bcc in emails.
How to use Mailto links If the phrase as old as the internet is correct, then the word as old as HTML is valid. HTML has been around for a very long time, and so has mailto. Which happens to be one of the most common schemes of HTML. Even with the evolution of the world, ol' mailto has remained relevant. Mailto functions very effortlessly. It is put behind a particular text.
Avoiding Spam Filters When sending emails for marketing, no one wants their emails to go to the spam folder. The target is to reach as many clients as you can. According to statistics, over time, the percentage of email messages getting to a recipient's inbox has increased. To be precise, five out of six commercial emails hit the targets. You do not want to be among the ones who miss the goal.
Hugo responsive image srcsets How to render picture tag images in Hugo with custom render-image.html layout. What is hugo? Hugo is a static site generator written in Go. One can write content in markdown and render HTML using simple HTML templates. What are responsive images? Responsive images are images on a website that differ based on screen size or device properties. One popular method in HTML5 to serve responsive images is the <picture> tag.
Random email generator Create random email accounts with MailSlurp’s free email API. Why do we need random emails? Randomized email accounts are useful for testing and privacy. MailSlurp is a free random email generator that can be used by anyone. Sign up and create an inbox You can sign up free and create real email addresses. These email addresses can send and receive real emails and attachments. Code or UI access Create random email addresses in the online dashboard or programmatically in a number of languages.
Receive email in code and tests MailSlurp is a free API for that lets your receive emails in test and code. How to receive emails in tests and event listeners Many applications today have the need to either send or receive emails. Perhaps your app needs to receive invoices from customers via email; or you want to test user sign-up processes with real email addresses. In each instance you need to somehow get SMTP mesages into memory from within a test or applicaiton.
Send attachments with an Email API Sending email attachments Even though attachments are an incredibly common aspect of email, SMTP, the underlying protocol, doesn’t actually specify what one is or how it should be transferred. Attachments weren’t really a thing when email was invented. However, the designers left room for extension with the concept of MIME Parts. SMTP MIME extension Attachments that your receive in Gmail or Outlook are actually transferred as ASCII text using an encoding called MIME.
Using Email APIs to send and receive emails MailSlurp is a free email API for creating email accounts on demand that can send and receive real emails from code or tests. What is an email API? Many applications and businesses today depend on email. Email powers user sign-up, invoicing, payments, communication and more. Email has been around for a long time but the underlying SMTP technology hasn’t changed much.
Deploy Redash to AWS with Terraform What is Redash? Redash is an open-source data visualization tool used by companies as diverse as Soundcloud, Mozilla, and Waze. It allows developers and analyts to query data, graph results, and share insights with others. The best thing about Redash is that it is completely free to self-host (minus your own infrastructure costs). Why deploy self-hosted Redash? Redash.io offers a super simple one-click start for hmanaged Redash instances.
NodeMailer NPM Tutorial NodeMailer is a popular NodeJS package for sending and receiving emails. It’s open source and has no external dependencies! Let’s see it in action: NodeMailer requires access to an SMTP server, if you don’t have access to one or need a frontend solution try MailSlurp’s email API Installing NodeMailer First create a new NodeJS project with npm init -y. Then install NodeMailer from NPM with npm install --save nodemailer.
Fake Email Generator Use MailSlurp’s free fake email account generator for testing, privacy, and development. Generate unlimited test email accounts using the REST API, graphql, SDK clients, or the advanced dashboard shown below: What are fake email accounts It can be tiresome to sign-up for a new email account every time you want to test something. Email generators like MailSlurp let you create real email addresses instantly using a web app or developer tools.
Using test email accounts to test user sign up If you are a software developer you know how hard it can be to test user sign-up on websites or mobile apps. Many applications rely on unique email addresses. Additionally, most user sign up processes rely on email verification. How do we test this in automated tests? Creating email addresses in code With MailSlurp (a free email API) you can create real email accounts on demand in code or tests.
Test user sign up with NodeJS and Jest (testing email verification codes) An example Let’s imagine we have an application that allows users to sign-up. When they do they are sent a confirmation code via email. They are then asked to enter that code to verify their account. How do we test this? Test email accounts Services like MailSlurp provide test email addresses that can be used via HTTP APIs. If we create a new email address during each test run we can sign up with its unique email address and then parse the confirmation code to verify the account.
Receive emails in tests Why we need emails in tests Many applications send emails. They may be sent when a user signs up, or as part of a monthly newsletter. Whatever the reason, emails are essential for many programmers. As most developers use transactional email services, testing applications end-to-end can hit a wall when emails enter the picture. For many use cases the need for real and unique email addresses arises.
How to send emails with MailJet What is MailJet MailJet is a SAAS API for sending transactional emails. These emails are usually triggered by your application in response to a particular event. An example is sending an email to a new user when they sign-up. What does it solve? Services like MailJet make sending emails easy by abstracting SMTP protocols behind HTTP APIs, SDKs, and client libraries. This means you can concentrate on the emails you send not on how you send them.
What is a transactional email? Transactional emails are emails that are sent on behalf of an application as a result of a particular user event. Typically this can mean email verification messages, newsletters, invoices, and much more. Triggering emails Many applications have logic that handles user actions that should result in an email being sent. They then create an email and send it via SMTP or an email sending service.
Test email account If you need unique random email addresses for any reason you probably want to use test email accounts. MailSlurp is a free service for creating real email accounts in code, tests, or using a dashboard UI. Create test email addresses You can generate test email accounts on demand with API services like MailSlurp. MailSlurp let’s you create real, random email addresses from code then send and receive real emails.
Test email accounts Why developers need real email addresses Sending and receiving emails is an important aspect of many applications. Testing these processes is often difficult. It may be that user sign-up requires a unique email address so end-to-end testing this process requires a new email address each time. Often developers will avoid testing these areas as they aren’t aware of services like MailSlurp. MailSlurp lets you generate email addresses to send or receive emails from during tests.
Transactional Email Services Compared Many applications need to send emails at some point or another: either for user confirmation, password reset, newsletters, support and more. Whatever the use-case, sending emails with a transactional email service removes the time and stress of configuring a custom SMTP server. Remember, it’s important to test your email sending functionality end-to-end. MailSlurp is a email test account generation API that lets you create random unique email addresses and then send and receive real emails with them.
Test REST APIs with Kotlin, Retrofit, and JUnit5 A common concern for any developer is whether their code works. Unit tests catch many simple errors but the only way to truly know whether an application is working as intended is with end-to-end (or E2E) tests. These are tests that emulate user actions to verify aspects of your app that are key to its success. Consider what is essential for your business: account creation, payment processing, event tracking.
Email API for custom domains If you have a custom email address that matches your companies domain you may wish to use it programmatically in code or tests. With MailSlurp you can keep access to your custom email address and also access it in scripts and code. Custom domain setup First register a free account with MailSlurp. Add your domain and follow the steps to verify your domain. Setup API access You can call the MailSlurp email API using the REST API or one of the many official SDK libraries.
How to wait for Selenium to start during Codeception tests If you test using PHP and Codeception you may have run into the issue of how to start Selenium before your tests. Some people use a wait or sleep command but here is a tip to automatically start Selenium during tests and wait for it to start: Configure acceptance.suite.yml With the RunProcess extension with can add a special timeout wait command to wait for Selenium to start before starting our tests:
Smoke testing with CircleCI and NodeJS (how to catch bugs quick!) In this article I’ll explain what a Smoke Test is and why you should implement one to catch bugs early in your website, API, or application. What is a smoke test? A Smoke Test is a suite of end-to-end/integration tests that runs against your production application on a scheduled basis to detect potentially serious bugs or “fires”. If a signs of smoke is found, the Smoke Test should alert someone who can investigate.
How to test an email address There are many instances in which test email addresses are required: testing email campaigns; software development; and QA testing. MailSlurp is a free service for creating test email accounts that can send and receive emails from real addresses. Create a free MailSlurp account You can sign up for MailSlurp and then create an inbox. The inbox has an email address that can send and receive emails.
Do you really need MailChimp? (transactional emails with AWS SES, Terraform and Lambda) What are transactional emails? Many applications need to send emails. Usually these emails are triggered in code in response to a given event, such as a product purchase. For this reason they are often called Transactional Emails. But an app or backend service can’t just send an email, it needs to have a SMTP server setup. Setting up email servers can be tricky, so a number of services exist for sending emails with API requests.
Email API for marketing and more Build applications and social campaigns that customers trust with reliable email APIs for testind and development. Easy integrations MailSlurp has API SDKs in many languages: Example Create inbox Can list inboxes Send emails Receive emails Attachments Sent emails Extract content Create inboxes Send emails Receive emails Attachments Create inboxes List inboxes Send emails Send attachments Receive emails Extract content Download attachments Reply to emails Match and search Create email addresses Get an inbox Receive emails in code List inboxes Send emails Upload attachments Send attachments Wait for emails Receive attachments Wait for matching Extract content Create email addresses List inboxes Send an email Attachments Receive an email Receive attachments Create inboxes List inboxes Send emails Use attachments Receive emails Download attachments Create email addresses Send emails Receive emails Send attachments Create inbox Can list inboxes Send emails Receive emails Attachments Sent emails Extract content Create inboxes Send emails Receive emails Attachments Create inboxes List inboxes Send emails Send attachments Receive emails Extract content Download attachments Reply to emails Match and search Create email addresses Get an inbox Receive emails in code List inboxes Send emails Upload attachments Send attachments Wait for emails Receive attachments Wait for matching Extract content Create email addresses List inboxes Send an email Attachments Receive an email Receive attachments Create inboxes List inboxes Send emails Use attachments Receive emails Download attachments Create email addresses Send emails Receive emails Send attachments Language C# (.
Mailinator alternatives Mailinator is a popular email testing tool that let’s you create test email accounts. It is used by QA testers and developers to test email processes and application. Mailinator is quite old and lacks many modern features. An alternative is MailSlurp - a free email API with a powerful dashboard and libraries in many common programming languages. MailSlurp email service MailSlurp is an email test account service that lets you generate real email addresses in code or using a web app.
Introducing MailSlurp 2.0 I’m very happy to announce the release of MailSlurp 2.0. MailSlurp started as a free experiment and subsequently became quite popular. But the MVP experimental nature of its design meant it didn’t scale and was missing features. So with MailSlurp 2.0, the system was rewritten from the ground up, learning from user input to build a system that lasts. What is it? MailSlurp is an API for testing code with real email addresses.
GraphQL Email API Tutorial GraphQL is a hot new technology for fetching data using a graph. MailSlurp offers a free email address API that you can use to create inboxes, read email, send emails and more. Let’s see how it works. Where is it? Access the MailSlurp GraphQL email API endpoint at https://graphql.mailslurp.com. If you load the url in a browser you’ll see the GraphQL explorer. You can use it to perform queries or use your own graphql client locally.
Validate frontmatter Markdown SEO metadata in NodeJS Many websites today are built using static site builders and markdown with embed data: the JAM Stack. Markdown alone is useful for writing content. Adding Frontmatter YAML headers to Markdown allows us to embed meta data for static site builders. To validate this content to SEO we will share a test. Hugo setup Say you have a website built with Hugo. You might want to read all the content and check that the title and description properties of the markdown are of an appropriate length.
Fastest way to start a typescript project Typescript sometimes has a reputation for being difficult to get started with. Modern tooling has really improved this situation and it is now very easy to create a new project and get up and running in no time. Create a new project (in 30 seconds) In a terminal on Mac OSX or Linux create a new directory and navigate to it using this command:
Testing Content Security Policy CSP Headers If you run a website you may want to add modern content-security-policy (CSP) headers to control which resources can be loaded on your site. This helps prevent common frontend hacks (like cross site scripiting) by specifying a list of rules in a header on the response from the server serving your website’s HTML. This post will explain more. What is CSP A content security policy is a modern HTTP response header that can be attached to a response by a server to inform the browser about which resources can be safely loaded on the HTML that is delivered.
Stripe get all customers list (example) In this post we will share a quick tutorial on fetching all customers from Stripe using the Stripe API. The problem Stripe does not allow one to fetch all of one’s customers in one go. Stripe returns customers in paginated lists. This means we must paginate through the list in a loop using a startingAfter ID in batches of 100. Code example Here is an illustration of how to fetch all customers by paging through a list of customers from the Stripe API.
How to show latest package version in NPM NodeJS’s package manager NPM has a handy feature for listing outdated packages and updating selected packages to the latest version. The MailSlurp web app is built with NodeJS and Vue. We use the NPM outdated command to keep our packages up to date. Here is how. Showing outdated packages To see the old packages in a NodeJS project navigate to the project directory and run npm outdated.
and space in HTML tips and techniques There more to white-space than the spacebar. Computers have many ways of encoding space in documents, be they emails, PDFs, or HTML. The non-breaking space character ( character in HTML) is commonly used to separate strings and denote a string that should not be put onto a separate line after the space. What are HTML entities? In HTML or emails containing HTML some characters need to be encoded as HTML entities in order to be read by a computer.
Mailto Links Explained Mailto not working right? Chances are, you’re making a simple mistake that is causing your link to not open your default email client. Understanding a little about mailto link can also help. The link, placed inside of the <a> tag – like this <a href="email@example.com">mail me</a> – is used inside of HTML to open an email client with the email address inside of the tag. If you add commas, you can send the same email to multiple recipients.
Install Swift on Debian (Buster) sudo apt-get update sudo apt-get install libncurses5 clang libcurl4 libpython2.7 libpython2.7-dev wget Download package wget https://swift.org/builds/swift-5.4.1-release/ubuntu1804/swift-5.4.1-RELEASE/swift-5.4.1-RELEASE-ubuntu18.04.tar.gz sudo mv swift*RELEASE* /opt/swift/ Export path Add Swift to your PATH variable using your shell’s config file. Zsh echo "export PATH=/opt/swift/usr/bin:$PATH" >> ~/.zshrc Bash echo "export PATH=/opt/swift/usr/bin:$PATH" >> ~/.bashrc Open a new terminal and type swift --version to confirm. Handle missing dependencies If you see: version `GLIBCXX_3.4.26' not found (required by swift) Try these steps:
Easily start Selenium Server in a background process - and how to wait for it to start If you write software or QA tests you may have encountered Selenium. It’s a popular browser automation tool used for end-to-end acceptance testing. This means you can test applications in a real browser like Firefox or Chrome using code. There are many frameworks that support Selenium (such as Codeception, Specflow, ThirtyFour, and JUnit) but many of them lack a clear way to start Selenium before tests begin.
GitHub CLI Auth with token from environment variable You can use the github cli to automate release processes in continuous deployment situations. In CircleCI for instance set a context environment variable to the GitHub token for your user. Then in a script echo the variable into a file and read that with the Github cli. Be sure to unset the environment variable to ensure that the CLI does not complain (It checks the environment before executing to find your token and prevent use).
Testing with real email addresses in Ruby (Rails, Rspec) Ruby on Rails makes building and testing applications a breeze. But when it comes to user sign-up and email verification how do we test it? We can mock the email steps in tests or test it manually with our personal addresses but wouldn’t it be better if we could test automatically with real email addresses? Imagine if we could smoke test this aspect of our app so that we know for sure that essential email related processes are behaving as we expect them to.
Email Generator You can create real email accounts online using email generators. These accounts can be used for software testing, social campaigns, or privacy. One free service for email generation is MailSlurp. Generate email accounts Sign up for MailSlurp and create real email addresses using the dashboard. Use custom domains You can create email address with custom domains that you own by following the custom domain guide.
Email attachment size limit Email API services like MailSlurp let you send and receive email attachments in code and tests. What is the maximum size of an attachment Is there an email attachment size limit? NO. Not officially. The MIME email specication makes no mention of a file size limit - it isn’t very clear about attachments in generally though. What defines an attachment? Attachments are just another part of an email message body.