Definitely the error is caused by trying to call a function before the calling object is defined. Object->new defines it, then Object->function is how you'd call the functions on that object.
I agree completely, you've got redundant info there... delete the first ->send message, because later on you define all the parameters that the send function requires.