(Reuters) - Cloud technology company Twilio Inc said on Monday it would buy email technology firm SendGrid Inc in an all-stock deal valued at about $2 billion, combining two firms that handle communications between apps and their users.

A banner for communications software provider Twilio Inc., hangs on the facade of the New York Stock Exchange (NYSE) to celebrate the company's IPO in New York City, U.S., June 23, 2016. REUTERS/Brendan McDermid

While Twilio’s technology helps its customers like Airbnb Inc and Lyft Inc send text and other types of messages to its users, SendGrid focuses on email.

“We started Twilio by building voice, then SMS, video, web and mobile chat, channels like Facebook Messenger, WhatsApp. Along the way, email has been something that customers have asked us about,” Twilio Chief Executive Jeff Lawson said on a conference call explaining the acquisition.

SendGrid CEO Sameer Dholakia told Reuters in an interview that many of Twilio’s products fetch a higher amount of revenue per user than do SendGrid’s. The email firm, which will operate as a standalone unit within Twilio under Dholakia, could boost its revenue by selling Twilio services to SendGrid customers. The two have few joint customers.

“A huge part of the calculus for both sides was the cross-sell opportunity,” Dholakia said.

Twilio will offer 0.485 share of its stock for each SendGrid Class A common share. The deal is worth about $36.92 per share, a premium of 19.4 percent to SendGrid’s closing price on Monday.

SendGrid shares rose 14.5 percent to $35.40 in extended trading, while Twilio fell 4.5 percent to $73.

“While it’s expensive at 10 times [SendGrid’s] 2019 revenue, I think it is a good deal for Twilio that should work out well over the long term,” Pat Walravens, an analyst for JMP Securities, told Reuters, noting that Salesforce.com Inc recently acquired MuleSoft Inc for a price equal to 12 times MuleSoft’s future revenue.

Analysts also noted that it would have been hard and expensive for Twilio to build out its own email capabilities.

“There are separate laws that are regulating email. So it’s outside of their wheel house, and in my opinion it would have taken them some time if they decided to do it organically,” Stephen Bersey a senior analyst at MUFG Securities, told Reuters.

Meanwhile, Twilio’s Lawson told investors on the conference call that two partners of Bessemer Venture Partners, Byron Deeter, who is on the boards of both companies, and Jeff Epstein, a Twilio board member, recused themselves from the deal talks. Bessemer invested in both firms before they went public and owns about 13.7 percent of SendGrid’s shares.

“This decision was made between the two companies, without any involvement from anyone at Bessemer,” Lawson said.

Goldman Sachs is the financial adviser to Twilio, while Morgan Stanley is SendGrid’s financial adviser.

The companies expect the deal to close in the first half of 2019, subject to approval by shareholders of both companies.