How PHPFOX enjoys the power of Mandrill?
Let’s pick up right where we left off last week in Part 1 of this series, where we were talking about what is mandrill and why it is?And, if you’ve not already had a look at it, I recommend first reading Part 1 of this series before diving into today’s post.
We have talked about Mandrill, a transactional email product from MailChimp authors. In this part , I plan to discuss on
- Available API calls and response formats of Mandrill.
- PHPFOX and Mandrill API
Let’s dive on these …
As we Know Mandrill offers a wide range of features that meet your expectations from an Email campaign management site such as tracking of Email opens and clicks, full statistics on mail sent, bounce management, as well as a raft of other customization settings.
You can use Mandrill to send Email via standard SMTP, or via their API.
Available API calls and response formats
The Mandrill API is a mostly RESTful API. Known caveats:
- All API calls should be made with HTTP POST.
- You can consider any non-200 HTTP response code an error – the returned data will contain more detailed information
- All methods are accessed via: https://mandrillapp.com/api/1.0/SOME-METHOD.OUTPUT_FORMAT
The Emails are sent using an HTTP POST request on port 80 so unless you work for a totalitarian company which has blocked the internet then you should be guaranteed that your Emails will send every time.
Depending on what you want to accomplish via the API, you’ll use a different API endpoint, and different parameters in the API call to accomplish your task.
Mandrill API endpoint URL is https://mandrillapp.com/api/1.0/.For example, the /users/ping API call is reachable at https://mandrillapp.com/api/1.0/users/ping.json.
Mandrill API support four types of output formats. To use any of them, simply replace the file extension in the API URL (OUTPUT_FORMAT above) with one of: .json (default), .xml, .yaml, .php
The response data for each call will be encoded in the specified format. Regardless of the output format desired, it accepts only JSON objects or HTTP POST parameters as inputs.
API Call Categories
Mandrill categorizes the entire supporting calls in to the following categories.Users, Messages, Tags, Rejects, White lists, Senders, Urls, Templates, Webhooks, Subaccounts, Inbound, Exports, Ips, and Metadata. For more details of complete list of methods and their details that supported by Mandrill visit: https://mandrillapp.com/api/docs/index.html
PHPFOX and Mandrill API
PHPFox is a PHP-based social networking platform which allows you to launch a social networking site without customizing the code. Its modular structure allows developers to develop custom modules and libraries without affecting other modules. Please visit “PHPFox – The best platform to build your own social networking site” or PHPFox Customization & Development
PHPFOX supports mailing using PHPmail and using external SMTP. We can configure and enable external SMTP from the administrator control panel. The option on the administrator’s control panel is limited to the SMTP host, username and password. This mailing system is completely designed for notifications and some internal emailing services.
Sometimes we need to extend our mailing to some complex modules like campaign monitoring system that need tracking of opens, clicks etc. For this the options on administrator panel are insufficient. We need a sophisticated Email platform for solving this issue. Here comes Mandrill. For example, suppose we need to get inbound emails forwarded to our system.For that we need to configure Mandrill for routing path of ‘from email address’ patterns . We don’t have any option to configure such mail addresses on administrator’s panel.
Mandrill has several options to avoid Spam, tracking options etc. We can easily overcome these difficulties we are facing using the resident email system on PHPFOX by replacing it by Mandrill API.
Some advantage of using Mandrill API is:
1. We can reuse same template for several type of notifications on Mandrill account.
2. By using merge tags we can easily achieve customized email service to several users on a single call.
3. System will be quite steady since we are not using PHPmail.
4. Tracking will be easy since we could able to configure options on API calls that which need to track and which are not.
5. While sending campaigns or invitations we can easily achieve it on a single API call for multiple mails.
Let me know how much useful was this blog for you…pop it in the comments below
I hope you will stick around on the Cubet’s Blog, as I’ve one more in this blog series for you. Wait for me!!! 🙂 I‘ll comes back in the third and last part of this blog series… “Integration of Mandrill with PHPFox’’