i personally prefer SMSD. you just create properly formated text file in right directory so it can be done with just one line of code. any scripting language will do that.
recieving messages is simple too - read from txt file. plus you can send binary messages like logos, vcards and stuff like that