Mad Mimi Error When Trying to Send Email to a List

46 views Asked by At

I am trying to get my Rails Application integrated with Mad Mimi to send out e-mails. Using the API which can be found at https://madmimi.com/developer/mailer/send-to-a-list?escape=false

Here is what I put into the ruby emulator on my terminal:

Net::HTTP.post_form(uri, 'promotion_name' => 'bulletin',     'subject' =>     'Your Daily Bulletin Update', 'from' => 'noreply@matsu-    namibiaflood.opensciencedatacloud.org/', 'list_name' => 'bulletin')

Here is what was the result

NameError: undefined local variable or method `uri' for main:Object
from (irb):8
from /usr/bin/irb:12:in `<main>'

What should I do, and should I be putting this code somewhere else?

1

There are 1 answers

0
NikitaSmall On

As far as I know, you need to specify the uri, because it is a simple varible. So, if you need to use post-request to some url - you need to put your addres as first parameter at this method.