简体   繁体   中英

Mad Mimi Error When Trying to Send Email to a List

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM