Monday, October 12, 2009

Rails ActionMailer Setup for Yahoo SMTP

I have been working on a new project lately. Today I decided to setup email notification system for it. I first thought of using AuthSmtp ( to send out emails to users but then I opted for yahoo email where I had also registered the domain.

I setup a new email address from which I am going to send out emails to the users of my system. Like activation emails, new message notifications, etc.

But the code kept throwing"Errno::ECONNRESET (Connection reset by peer):' error whenever I tried to connect to yahoo's smtp server and send a message. It took me a while to figure what the problem was: Yahoo told me to use port 465; whereas the correct port number to use is 587!

So to save you couple of hours filled with frustration and hair pullings, here's the action_mailer setup that works:

ActionMailer::Base.default_charset = "utf-8"
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "",
:port => 587,
:domain => "",
:user_name => "",
:password => "some-password" ,
:enable_starttls_auto => true,
:authentication => :plain

Saturday, April 18, 2009

'MeToo': WiFi based chat application for iPhone

Because of (, I find myself thinking frequently about social interactions among strangers.
In Istanbul, a lot of people 'peek' around in their hang-out places using Bluetooth scanning. You scan, you see a list of 'bluetooth names', you pick one and try to create a connection. These people must spend a lot of time coming up with a catchy nickname.

My new iPhone app, MeToo provides a similar service.

Here's what it does:

When you run MeToo, it automatically starts broadcasting you in the WiFi network. (I guess now is a good time to mention that you need a WiFi connection to use MeToo.)

You can update your nickname, your profile image and your gender at any time and as frequently as you want. Your updates are always broadcasted to others running MeToo around you.


The 'Around You' tab shows who else is around you. If there are no users around, you won't see anyone of course. But MeToo constantly scans the network without having to restart it. So it may be a good idea to keep it running in case someone shows up.


When you click on a name to chat, that opens up the chat window and a connection is created. Once connected, you get to see the user's profile picture. If you don't send any message, he/she will never know you connected.
You can send chat messages, photos and if your iPhone allows for it there is even a button to automatically send your phone number to the other user (don't worry there is a confirmation message that appears to make sure you really intend to do so).


Photos appear small in chat message bubbles but you can see bigger versions if you click on them.


MeToo makes a sound when you receive a new message unless you are on the chat window with the sender in which case MeToo vibrates.

MeToo makes also a good effort in trying to figure out if the person you are chatting with logs out suddenly and notifies you.

I must add that this is version 1.0.0 (maybe I should have added another zero at the end). I put quite an effort into it but by no means would I claim it is flawless.

MeToo supports English and Turkish.

You can get it here:

Thursday, March 19, 2009

Loto Climbs Up To Number 6

I didn't win the lottery but my Loto iPhone application climbed up to number 6 in the Top Paid Apps list in Turkish iTunes store. ;)

Tuesday, March 10, 2009

Loto - My New iPhone Application

Turkish National Lottery (Süper Loto) is now 34 million TL (roughly $19 Million) !
So I wrote a new iPhone application that gives you numbers to play when you shake your phone...

You can get it here:

Sunday, March 08, 2009

Another iPhone App

I just released another iPhone app that works like the Magic Eight Ball.

You can download it here:

Tuesday, March 03, 2009

Safari 4.0 Beta is Available

I'm a big fan of Firefox. I like its plugins, the developer tools etc. What I like the most is the ability to set multiple websites as the homepage. So with one click on the 'home' icon I can open multiple tabs with the sites I read the most.
What I don't like about Firefox is that it gets slow and even crashes sometimes. And that happens pretty frequently lately. I guess the more plugins you install, the more you pay for it.

Safari version 4.0 Beta is now available. I gave it a test run. It has a very cool 'Top sites' functionality. I only wish Apple made it easy enough to add ad hoc sites to that view rather than picking most visited sites from history automatically. I simply want to add the sites I want myself. Sometimes too much system intelligence is simply that, too much.

I think I'm going to give it a go and stick with Safari for one week. Let's see what happens.

Monday, February 23, 2009

QCall is now QDial

I had recently announced the release of QCall.

That release was done under the Apple Developer License. I removed it from the app store and re-released it with my personal developer license ('cagan327') and with a new name: QDial.

Tuesday, February 17, 2009

Acil (iPhone App) is Number 2 Top Paid App in iTunes Store

As I mentioned here, I recently wrote an iPhone application named 'Acil'. It simply allows people to make emergency calls in Turkey.

When I checked iTunes Store's Turkey branch today, I saw that it made number 2 in the 'Top Paid Apps' list.

I never knew that fame would come this easily to me ;)

From File_column to Paperclip (a.k.a 'No more RMagick')

Today was the 'upgrade to Rails 2.2.2' day at the office. While updating the system, I also replaced the good 'file_column' with the better 'Paperclip' plugin.

There were basically 3 reasons for my choosing paperclip over the other:

1) I won't have to go through the hell of installing RMagick ever again
2) Paperclip doesn't consume nearly as much memory while uploading files
3) is a cleaner syntax than url_for_file_column(@user, "photo")

Thanks to RailsCasts for introducing me to Paperclip.

Wednesday, February 11, 2009

Emergency calls in Turkey

The fact that there are separate phone numbers for each specific emergency case in Turkey amazes me. If you need to call the police, dial one number; if you need medical help, dial another one. There are even two different phone numbers to report fire and forest fire. Why not make things simple for people and use a 911-like number? So I wrote an iPhone application that makes things a bit easier when one is in trouble.

The application is available here:

Monday, January 19, 2009

Profesyo iPhone App is now available in iTunes Store

Finally!!! After much ado, Profesyo iPhone application is in iTunes Store!
The approval process took a bit longer than anticipated as I mentioned
here. But overall it was an instructive process.

The app is available here:

Sunday, January 18, 2009

QCall - My First iPhone Application in iTunes Store

While waiting for my iPhone app to be approved by Apple, I wrote a simple utility app called QCall ('Quick Call') and it's been released at iTunes store.

QCall simply presents a 4x5 grid of squares to each of which you can assign a contact phone number for quick dialing and sms sending.

It's a free application. You can download it at :

Friday, January 16, 2009

Apple says one of Adobe Photoshop's custom shapes is an Apple trademark image

I recently started writing iPhone applications. I really enjoy it too. The SDK is brilliant. The documentation is almost perfect. Samples are abundant.

For initiation, I decided to write an iPhone app for our which is a professional network site in Turkey. The functionality would be to display the financial market status, your contacts as well as to send people connection requests and process the connection requests you received.

I wrote the app, signed the code and submitted to Apple through iTunesConnect on December 29th, 2008.

Around a week passed, a message from Apple saying that they can't deploy my app as it was violating one of iPhone UI guidelines related to table views. Fair enough. I made the proper change and resubmitted.

Yet another week passed, and another message. This time telling me that I have to notify the user if there is no network connection as my app relies on one being present. I was displaying blank values in that case. That's fair too. Once again I made the change and resubmitted sure this time that I've done everything right.

And another week passed, and you guessed it right, another message. This one is interesting. Here's the complete text of the message:

Dear Cagan,

Thank you for submitting to the App Store. We've reviewed and determined that we cannot post this version of your iPhone application to the App Store because of an Apple trademark image. We want to remind you of the importance of following Apple's posted Guidelines for Using Apple's Trademarks and Copyrights: . Please see the enclosed screenshot

If you believe that you can make the necessary changes so that does not infringe on Apple trademarks, we encourage you to do so and resubmit it for review.


Apple Logo and Apple-owned Graphic Symbols:

You may not use the Apple Logo or any other Apple-owned graphic symbol, logo, or icon on or in connection with web sites, products, packaging, manuals, promotional/advertising materials, or for any other purpose except pursuant to an express written trademark license from Apple, such as a reseller agreement.



iPhone Developer Program

Hmmm...Cagan is getting upset!!!

So I got very curious as I don't remember using any one of Apple's images. I quickly opened the attached screenshot:

Well waaaaiittt a second there tiger!!!!

First a trademark on a wireframe earth image?

Second, I was pretty sure I found that somewhere in Photoshop. I fired up Photoshop (CS3 for detailed oriented readers) and sure enough it's there:

Not only has it been 3 weeks since I submitted my app; I now have to battle with Apple over this? I'll resubmit with another image of course. But I'm pretty annoyed.

Anyways, that's the story..I just wanted to share it.