jQuery Plugin – jMailer

December 13, 2009

jMailer is a plugin for jQuery I wrote that provides the visitor with a popup email form. It should be attached to a link element and when that link is clicked, the popup appears centered in the viewport.

Within the popup is a form which let’s the visitor enter an email address they want to send the email to, their email adress so that the recipient can reply directly to them, a subject box and a message box.

jMailer Example

The ‘Contact Me’ tab at the top of this site has the plugin attached; click it to see the popup form and send me a message :D
The To field has been mapped to my own mail address in the back-end so messages will only come to me.

You should also note that the plugin constitues just the front-end. A back-end of your choice (PHP, .NET, etc) can be attached to do the physical sending of mail.

jMailer Features

The current release (1.1) of jMailer has the following features:

  • Automatic modality
  • Automatic iFrame shim when IE6 is used
  • Configurable opening and closing animations
  • AJAX sending of form data to the back-end and confirmation message
  • Basic error checking for non-completed fields

jMailer Usage

Using the plugin is simple: Download the source file and ensure you have a copy of the jQuery library to hand (min version 1.2.6).

Then just attach the plugin to the link using standard jQuery syntax:

$("#mailerLink").jMailer();

jMailer Configuration

A configuration object can be supplied in the constructor to configure various options:

var config = {
  modal: true || false //defaults to true
  id: "a string" //defaults to "mailer"
  shim: true || false //defaults to false unless IE6 in use
  forceShim: true || false //defaults to false
  defaultClass: "a string" //defaults to "mailer-container"
  additionalClass: "a string" // defaults to null
  suppressTo: true || false //defaults to false
  animation: hide || slideUp || fade //defaults to hide
}

$("#mailerLink").jMailer(config); 

20 Responses to “jQuery Plugin – jMailer”

  1. madcontent says:

    Thanks for posting such a informative weblog. Your website happens to be not only useful but also bvery imaginative too. We come across only few people who can think to create technical stuff that creatively. I keep looking for articles with regard to a subject like this. I Myself went through several blogs to find knowhow regarding this. Looking forward to many more from your site !!

  2. benj says:

    Hi from australia, good website. I should come back next week to see what’s new.

  3. Adam Bott says:

    Hello, first I want to say great blog. I don’t always agree with your opinion but it’s always a great read.
    Keep up the good work.

  4. Yan Hense says:

    If Dos Santos wins this, he has to be the number one contender,

  5. Cool! Keep up the good work and thank you for sharing.

  6. iamamantel64 says:

    Hello. This is kind of an “unconventional” question , but have other visitors asked you how get the menu bar to look like you’ve got it? I also have a blog and am really looking to alter around the theme, however am scared to death to mess with it for fear of the search engines punishing me. I am very new to all of this …so i am just not positive exactly how to try to to it all yet. I’ll just keep working on it one day at a time Thanks for any help you can offer here.

  7. Dan Wellman says:

    Hi, creating a new theme is relatively easy, look at how the default theme is created and modify it to suit your own needs. see this tutorial for tips: http://www.cypherhackz.net/archives/2006/12/13/make-your-own-wordpress-theme-part-1/

  8. I am quite new to wordpress. but what you write in this post is really great and very informative. I think it will help me in the future. Thanks for the great job

  9. OP: I could be daff (lord knows I have been told lol) but you made absolutely no sense what so ever…

  10. Well written and a great read :)

  11. Ivey Cabello says:

    Tolle Internetseite – Habe “a little Question”. Mein kleines Ego ist auch unmittelbar dabei meinen Weblog zusammen zu bauen und ich finde dein Design gut. Wo kann man das Theme herbekommen?

  12. Inez Gonsar says:

    This is a great blog you got here. The theme looks nice, awesome color combination.

  13. Loving your guides. JQuery is great when you get the basics. Its not easy to track down good basic instructions.

  14. Doug says:

    Nice article. Im a newbie and have the frontend working but is it possible to use classic ASP as back end. Line 168 has ” $.post(url, formData, processResponse)” if I send it to an asp page how do I (or can I) pass back the response? Thnks

  15. Dan Wellman says:

    Hi, it *should* be possible

    Unfortunately, I know less about classic asp than I do about .net, and I don’t know a whole lot about .net ;)

    But as long there is something in classix asp roughly equivalent to PHP’s echo statement, it should be possible. Please let me know how this turns out for you as I am considering rewriting the plugin and this could help make it much more platform independant if it can handle classic asp ok :)

  16. Like my employer, I seldom express good job to a good something, however nowadays immediately after stumbling right into the doorsteps of the web site, I can say you probably did an awesome job! And I ain’t your manager.

  17. Woah! I’m really loving the template/theme of this site. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between superb usability and visual appearance. I must say that you’ve done a excellent job with this. In addition, the blog loads very fast for me on Chrome. Exceptional Blog!

  18. Druckertypen says:

    Can you make it more clearer? I’m really having difficulty incorporating Jquery to Mail configuration or i only have to use jmailer?

  19. Dan Wellman says:

    Honestly? I’d use a different plugin now. This plugin was written 3+ years ago and is badly in need of updating. That said, it should still work if you get it set up right.

    What are you having difficulties with specifically? Have you got the front-end working but it’s not posting to the server? Any errors in the console? Do you have a working page you can link to?

  20. Rowena says:

    I’m really enjoying the design and layout of your site.

    It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often.
    Did you hire out a designer to create your theme?
    Superb work!

Leave a Reply

My Books