Welcome to this week’s design and development roundup!
We’ve got a bunch of freebies and resources for you to download this week, including a great selection of icons, an overview of CodePen’s new UI updates and muti-platofrm Omnimail. Enjoy!
170 Free Line Icons
Photo: PSD Hive
Sometimes you just need a go-to resource when mocking up a design for a client, and a source of icons is always welcome. Here’s 170 stylish and diverse line icons, handcrafted by Creative Boxx. For free!
CodePen & New UI Updates!
I am a huge fan of CodePen. For someone who works in a team with various skill sets & multiple projects on the go constantly, getting help on particular coding problem is sometimes hard to come by when no one has to time to switch over to the project you’re working on. CodePen saves me here, and has, countless times. I just port my code snippet over, and post it in Slack to see if anyone can find my issue.
A couple of days ago, CodePen updated it’s UI, adding a dropdown to each of the editors, which brings together many of the actions you can perform on an editor and the code it contains.
The Tidy and View Compiled functionality used to be buttons tucked away in the header, and Analyse used to be stored somewhere within Settings. Now everything is right in reach! HTML Analyze has been brought back after it was removed due to a security issue also.
Chat API for WhatsApp
Chat API is an interface to WhatsApp messenger which allows sending messages over WhatsApp. The API requires the following:
- Username: User phone number with the country code but without ‘+’.
- Nickname: User’s name that appears on notifications
- Debug: if set to true, returns information about the request.
A number can be registered like so:
$username = ""; $debug = true; // Create a instance of Registration class. $r = new Registration($username, $debug); $r->codeRequest('sms');
This request should return a password via sms which can be used to log into WhatsApp like below:
$username = ""; $nickname = ""; $password = ""; $debug = true; // Create an instance of WhastPort. $w = new WhatsProt($username, $nickname, $debug); $w->connect(); $w->loginWithPassword($password);
The API supports multimedia messages which can be sent like this:
$target = "34123456789"; $pathToVideo = ""; $w->sendMessageVideo($target, $pathToVideo); $w->pollMessage(); $w->sendMessageVideo($target, $filepath, false, $fsize, $fhash, $caption); $w->pollMessage();
Omnimail is a perfect all-in-one library for sending emails across all platforms using one simple interface. For so many projects have we integrated Omnipay for its effortless payment gateway integration, now Omnimail seeks to provide the same frustration-free integration for sending emails. The library currently supports: AmazonSES, Mailgun, Mailjet, Mandrill, Postmark, Sendgrid and SendinBlue.
The email object consists of:
$email = (new OmnimailEmail) ->addTo('email', 'Recipient Name') ->setFrom('email', 'Sender Name') ->setReplyTo('email', 'Sender Name') ->addCc('email', 'Sender Name') ->addBcc('email', 'Sender Name') ->setSubject('') ->setTextBody('') ->setHtmlBody('');
You’re able to add attachments through:
$attachment = (new OmnimailAttachment) ->setName(‘file-name.txt’) ->setMimeType(‘text/plain’) ->setContent(‘Contents to place in the file’);
Alternatively, you can attach a file:
$attachment = (new OmnimailAttachment) ->setPath(__DIR__.’/file-name.txt’) ->setMimeType(‘text/plain’);
If you’re currently doing an integrate with any of these providers, I’d strongly recommend you look at migrating to this more universal library.