Mandrill API E-mail queue with sinatra

Trying to get form to send e-mail to Mandrill api. My email keeps getting queued and will not send.

post my-handling-form-page do

    m = Mandrill::API.new
    message = {
        :subject => Hello from the Mandrill API,
        :from_name => #{params:name} #{params:email},
        :text => Hi message how are you?,
        :to => 
            {
                :email => [emailprotected],
                :name => Recipient1
             }
        ,
        :html => <html>#{params:msg}<html>,
        :from_email => [emailprotected]
    }
    sending = m.messages.send message
    puts sending
    erb :index
end

Error says:
{email=>[emailprotected], status=>queued, _id=>216c30f42ee849e2a70528e3d4f9774f, reject_reason=>nil}

Help would be appreciated.

View More Answer And Comment : Stackoverflow


Top Answer 1

According to Mandrill api:

subaccount

the unique id of a subaccount for this message - must already exist or will fail with an error.

(At least for me the test start working after removing that field).
Mandrill definitely should improve their response errors.

Top Answer 2

According to Mandrill api:

subaccount

the unique id of a subaccount for this message - must already exist or will fail with an error.

(At least for me the test start working after removing that field).
Mandrill definitely should improve their response errors.

Top Answer 3

According to Mandrill api:

subaccount

the unique id of a subaccount for this message - must already exist or will fail with an error.

(At least for me the test start working after removing that field).
Mandrill definitely should improve their response errors.

View More Answer And Comment : Stackoverflow

Warming up Chronicle

I am using the Indexed Chronicle queue (version 3.4.3) in a latency sensitive application. To smooth out the latency spikes, I have a blocking queue, in front of the chronicle, where producers drop [Read More...]

Giving indices to list entries

I have a Python list looking like this: A1 = ['a','a','a','foo','c','d','a','e','bar','bar','bar','e','d','d'] I want to transform it into this... A2 = [1,1,1,2,3,4,1,5,6,6,6,5,4,4] ...where [Read More...]

cannot register wcf with autofac

I'm trying to register wcf service with autofac in hexagonal architecture where only core layer reference to UI layer and all other layers refer to DI layer. I'm sharing what i've done so [Read More...]

Add new canvas context method

I use the following code to make sure resetTrasform method is available for canvas. if (!CanvasRenderingContext2D.prototype.resetTransform) { CanvasRenderingContext2D.prototype.resetTransform = [Read More...]

Connect to MySQL Fabric with PHP

I only have a high availability group in my MySQL Fabric configuration and I would like to connect to it with PHP. I check http://dev.mysql.com/doc/mysql-utilities/1.4/en/fabric.html for Fabric aware [Read More...]

ASP.NET MVC: No owin.Environment

I feel I've got the same problem as described in this thread. I am working on an ASP.NET MVC web application that runs fine locally. When deployed to our Windows Server 2008 with IIS7, however, I get [Read More...]

Entity Framework 4.1 DbSet Reload

I'm using a single instance of DbContext scenario to shadow entire copy of the database locally in a WPF app. I've heard this is bad practice, but my database is small and I need an entire copy of it [Read More...]