PHP, Mail() and Mountain Lion

As I was working on implementing email (sendmail) in symfony2, I stumbled upon an annoying issue with emails not being sent on my local machine using Mail() with MAMP. I didn't have this issue prior to upgrading to Mac OS X Mountain Lion so if you're on a version of OSX older than Mountain Lion, you might be okay. I should probably say that I'm not by any means an expert on the subject. This solution came upon trial and error so hopefully this will help you save sometime if you're dealing with this issue. It seems to be a common issue since Mountain Lion came out, and that's why I decided to write about it.

Mountain Lion uses sendmail as an alias for postfix (not sure why) so you need to configure postfix instead of sendmail. You'll need to alter 3 files in your local machine to enable mailserver and postfix. You can follow this step-by-step process here. The files are:


/etc/hostconfig
/etc/postfix/main.cf
php.ini (since I'm using MAMP, this is located here /Applications/MAMP/conf/php5.4.4/php.ini)

I followed the step-by-step tutorial above and I couldn't still send email with Mail() successfully. After inspecting the mail log (tail -f /var/log/mail.log), I was able to see that postfix wasn't working and I was getting an error mainly because I didn't have the directories postfix was looking for. You can create the directories by running this command at your terminal.


<span class="attr-name">sudo mkdir -p /Library/Server/Mail/Data/spool</span>
<span class="attr-name">sudo /usr/sbin/postfix set-permissions</span>
<span class="attr-name">sudo /usr/sbin/postfix start</span>

You may (or may not) see some errors after running these commands but postfix should be working now. I hope this saves you hours of work!

The Next Big Thing

In 2000, when I was 19 years old, I made a big risky move in my life, arguably the riskiest: I relocated to America from Brazil. In my mind, I was decidedly following my father’s footsteps of living abroad at a young age, and pursuing a dream career as a designer. Back then, I had no idea that a designer’s job is much more than creating “pretty” things; it’s creating a positive impact on people’s lives.

Back in 2003, when I was graduating from a graphic design program at Bridgewater State College in Massachussets, I was offered a job at a local small and nimble printing shop, Anchor Press. My professor, Karen Alves, told me something that stuck with me: "You're a smart young man. You take this job, if it doesn't work out for any reason, you'll leave. But the most important thing that will happen is you'll meet a lot of people. Some people will become part of your life for a long time and some won't, but what you'll learn from these experiences will be priceless." I was nervous to take the next big step, specifically in a completely new career. I felt vulnerable to my own skill. I didn't feel confident but I was happy to be taking the next step in my life.

Certainty

Geek Squad

In August of 2006, I had just gotten back from Brazil after a 6 months visit in that lovely country. I needed a job, but I didn't want to go back to waiting tables — not because of money, which was very good, but I had a vision of what I wanted to pursue in life. So I began pursuing my vision by taking some freelance work and applying for a job at the Best Buy in Brockton, MA for additional income. My geek skills were good enough to get this job, thanks to the staff at the Moakley Technological Center at Bridgewater State College, and Isabel Gomes, Bruno Furtado and Ron Lourenco for hiring me.

Best Buy Headquarters

In March of 2007, I got a job as a web designer at Best Buy headquarters in Richfield, MN— thanks to Bryan Brandau, Brian Flynn and Dan Babbitt—to be part of the ETK Team, a group that was responsible for changing how Best Buy interacted with its employees in the field.

Four years later, I got a position as a Senior Designer on bestbuy.com. There, I learned a lot and improved my design skills with a focus on e-commerce. It was fascinating to work on a website as big as bestbuy.com and see what we created impacting millions of customers that visited the site on a daily basis. During my career at Best Buy, I was challenged a lot and most importantly, what I learned during my time with them, as my professor said, was priceless.

Uncertainty

On June 22nd 2013, about a month ago, I quit my job at Best Buy as a Senior Designer for Bestbuy.com. I left a company that has helped me grow as a person, taught me a lot, and supported me through the most difficult period of my life1. It was not an easy move (you can call me mushy. It's fine.) But, as with anything in life, it was time for me to move on. This coming August would be my 7th year anniversary with Best Buy. That's nearly 17,000 hours of work put into one company.

I didn’t leave Best Buy to join a competitor such as Amazon, Target, Walmart, as it's been the trend lately. Although I've been contacted by such companies, and with offers to earn nearly twice as much as I was making, I turned them all down. (Money is very important to me and I believe to most people, but it’s certainly not the only priority on my list; I need to be happy with what I’m doing. Fairness is key here.)

I left my “steady” job to build a company, Cympel, with two friends. I’m taking on a big risk in life to leave a steady job for something uncertain — to live in a world of uncertainties. It’s scary but even more scary to me is to get settled in my comfort zone, which, in fact, scares the crap out of me.

Cympel

Jesse Hultgren, Courtland Caldwell and I left our “steady” job at Best Buy to found Cympel, an internet start-up focused on solving an interesting problem with advertising online. The experience of ads online is cumbersome and often unpleasant for a $50 billion dollar industry. Ads online are, in their current state, unattractive for consumers and inefficient for brands. We believe with our technology and expertise we can change that.

Jesse Hultgren, who holds an MBA from Carlson School of Management and has an extensive background in finance and business, and has worked with venture capitalist firms, is the CEO of the company and in charge of business operations, which include investor relations, public relations, relationship with our partners, and raising capital amongst other things.

Courtland Caldwell, who is a nerd by trade and has an extensive background in agile software development, testing, and release engineering, is the CTO in charge of product development.

And, I, notably known as Juju, am the Product Designer in charge of design, UX, and front-end development. As the head of design, my job is to set the tone for the visual language while working in alignment with the business team to make sure that there's a cohesive vision and execution throughout all our products.

We joined Straight Shot, the first accelerator with a focus on e-commerce startups in the country, in Omaha, NE for three months. And while we’re excited about this opportunity, we’re acutely aware of the challenges that lie ahead.

In a country economically impacted by investments (venture capital and private equity), investors are constantly looking to identify the next big thing. The next big thing for me is not what many people may define it as. The next big thing for me is leaving a steady job with a paycheck, stepping out of our comfort zone, and taking a big risk by entering a world of uncertainties. I’ve realized that more often than not, there’s tremendous risk involved in not taking risks at all. It is the risk of the risk not taken.

Taking risks is a big move regardless of the outcome. Today, I’m helping build Cympel, but tomorrow, I could be doing something else. Based on my background, I can firmly say that I do not have aversion to risk-taking. Let’s see what tomorrow lies for me.

The Next Big Thing isn't a thing at all. The Next Big Thing is now.


  1. I was involved in a tragic accident 3 years ago. Learn more.

DisclaimerIf there is ever any doubt, the views expressed here have nothing to do with those of my employer. read more

Even though I work for Target Corp, the views expressed here are my personal views and do not necessarily reflect the thoughts, opinions, intentions, plans or strategies of my employer.

And some legalalize:

All of my online communications are provided “as is” with no warranties or indemnities of any kind, and do not confer any rights. My employer is not responsible for the accuracy of any of my online communications.

You should know that I have no ability to bind my employer to any legal obligations. By way of example, I have no authority to grant or confer any right or license, either express, implied or by estoppel, under any patent, copyright, trade secret or other rights of my employer. If you would like a license to any intellectual property or other rights of my employer, you must enter into a written contract directly with it.

  • July 28, 2013