Posted on

New SMTP Pro Magento Email extension released

I’ve had a chance to make a couple of improvements to my SMTP Pro email extension for Magento. Both changes are not exactly life altering, one adds extra error detection to the self-test, and the other fixes a header problem with the self-test (reported by Phil). More details follow about the changes, if you want to get the extension, download SMTP Pro on Magento Connect. (Updated: finally on Magento Connect!)

I now send a real live contact form message as part of the testing – and ensure that when the email sends, my extension code is actually being called. I’ve had a lot of people reporting problems with emails not sending lately, only to find it’s because some other extension is interfering with my email sending. This tweak to the self test will help identify those issues.

This is implemented as a static variable on the self test controller, that is set before sending the test email and then altered by the email observer (if it is called as expected):

// Now we test that the actual core overrides are occuring as expected.
// We trigger the password forgot email, as though a user had done so.
 
self::$CONTACTFORM_SENT = false;
$this->_sendTestContactFormEmail();
 
// If everything worked as expected, the observer will have set this value to true.
if (self::$CONTACTFORM_SENT) {
	$msg = $msg . "<br/> Contact Form test email used SMTPPro to send correctly.";
} else {
	$success = false;
	$msg = $msg . "<br/> Contact Form test email did not use SMTPPro to send.";
}

and the code in the observer that alters this variable:

// For the self test, if we're sending the contact form notify the self test class
if($event->getTemplate() == "contacts_email_email_template") {
        include_once "app/code/community/Aschroder/SMTPPro/controllers/IndexController.php";
        Aschroder_SMTPPro_IndexController::$CONTACTFORM_SENT = true;
}

The other change was trivial, adding a ->setFrom() call when sending the test email. Thanks to Phil for pointing that out.

Lastly, Eric requested a useful feature which I will add, but I haven’t had time to put that in to this release, next time!

Let me know any feedback you have on the changes, or if you’re having trouble sending emails in Magento – feedback welcome.

Posted on

Latest Magento Development projects, MageBase.com and Magento spotting

Just a quick note about several things, not really a full post. I’ve got a few cool Magento development projects on the go at the moment, blog posts are on the way. I’ve started contributing over at MageBase and I think the comment system here is sometimes broken, but I need some of your help fixing it.

MageBase.com

I wrote up a little article over at MageBase.com to help you spot Magento stores in the wild. I thought it’d be a good opportunity to promote MageBase – it’s a growing community of Magento developers started by a few members of the Auckland Magento User Group.

Check it out. Feedback, article ideas and harsh criticism welcome.

Magento Development

In other news, I’m not dead, but close I got quite sick last week and have been now trying to catch up on a lot of things. I promise I’ll write some fascinating blog articles shortly – some of the exciting things I have been working on:

  • Auto responders that will follow up with a customer based on what they purchased a product-specific number of days later – for example an email that says “Time for the 3-6 month widget?” 3 months after someone buys a 0-3 month size widget.
  • The ability to automatically import a Google Docs spreadsheet and as store inventory, products and categories, allowing inventory management entirely outside of Magento.
  • An offsite cloud backup and restore extension that will give your store’s highly redundant data storage in a secure offsite facility.

Comments

One last thing, if you have been getting the blank page of death after posting comments on my blog I am so sorry. Thanks to Greg from Nexcess for pointing that out. I’m having trouble replicating it, please contact me if it happens to you so I can figure out why. This is also an excellent opportunity to tell you about one of my favorite Firefox extensions: Lazarus. It recovers lost form data when shitty websites lose your information (like my blog is apparently doing to some people posting comments). I can’t tell you how many times it has saved the day for me.

Posted on

Hosting Magento in New Zealand

I received an email from a fellow Magento developer asking about hosting Magento in New Zealand – this post is about that email and my response because I think it will be useful to others asking the same questions. All of the Magento stores I’ve built to date have been overseas (read: not in New Zealand) – my experience so far has only been with building low latency sites for American customers and UK/Europe customers. The reason for this is that at World Wide Access we recognize the importance of an in-country webstore presence to customer experience (bandwidth and latency).

It was a little ironic then, that an American developer, Justin from Unify Digital contacted me for advice about building a Magento store for New Zealand customers – for the same reasons that we build our stores offshore. Here’s what Justin had to say:
Continue reading Hosting Magento in New Zealand

Posted on

Magento contact form error: Unable to submit your request

Just a quick one, a number of users have contacted me reporting email problems with the error on the contact form Unable to submit your request, often this error is actually caused because between versions 1.3 and 1.4, an invisible form field called hideit was added to Magento, which if absent, will cause the form submission to fail. That means if your template has a custom contact form, it will break. That’s a bit of a bummer if you’re upgrading Magento versions.

There are a few fixes floating around, so I won’t reproduce one here.

Take your pick:

There’s a lesson there, be very careful about copy the entire default Magento template tree and making changes, try only copying the ones you need to change – it’ll make your template far more resilient to changes when upgrading.

Posted on

Installing a Magento Extension manually via FTP or SSH

A number of people have been having some difficulty installing my extension manually, and so they should, they are not designed to be installed manually but rather through Magento Connect. This will be a short and sweet guide to installing my Magento extension through FTP or SSH. This could probably be applied to installing any extension manually, so if you just need help knowing where to put extension files, read on.

Those that follow this blog (all 3 of you) will know that I’ve been unable to upload my latest release to Magento Connect and have been offering it for download through my site directly in the meantime. Quite a number of you have been able to install it without a hitch, but the confusing nature of the extension layout is blocking some people from being able to use the extension. Let’s hope this guide helps.
Continue reading Installing a Magento Extension manually via FTP or SSH