Auto validate delivery server

Pablo Oliva

New Member
Is it possible to eliminate the request to validate a delivery server?

We'd like to create customer accounts, including servers settings, in an external app and then have that info imported into MailWizz, and as a part of this process, we'd like to eliminate the request to validate the delivery server.
 
@twisted1919 I understand your concern. What if I could guarantee that the servers are already validated? Our app already uses the same server and server settings that are requested by MW. We would like to make the handoff from our app to MW as seemless as possible, and eliminating the need to validate already validated servers would be a big help to our customers. Thanks for considering.
 
Correct. This would only be needed the first time our users leave our Java app to use MW, but this "first" time would be upon each user's choosing, so it would be variable or dependent on each user. Once a user chooses to use MW, we import the settings if an account is not already active in MW.

We are not doing a bulk export/import, if that is what you were referring to.
 
I'm glad you asked :) I was looking into how to do that, and it seems that I'll have to extend the API (https://forum.mailwizz.com/threads/extending-the-api.1379/), if I'm not mistaken. I don't have all the details worked out yet, but this is the basic idea.

I already have a generic export/import into a test MW customer account working with the API, but I need to customize it so that we have this function available individually for each of our customers.

The following is what I would like to accomplish via the API. Please tell me if you see me running into any roadblocks or running into any limitations with the API.

The idea is that our customers within our Java app select an email list export function. This then redirects them to MW.
  1. Check if customer exists. This check would be done by quering our db (not the MW db, our Java desktop app-related db) to see if the API keys exist.
  2. If customer exists, read exported file and create new list. Then redirect to login page and auto log in (https://forum.mailwizz.com/threads/auto-login.1814/#post-10833).
  3. If customer does not exist:
  1. Create customer
  2. Generate API keys
  3. Create Delivery, Bounce and Feedback loop servers
  4. Finish import and create new list
  5. Auto log in
 
I think the workflow is good, that's how you should go about it.
Now, if you are going to extend the api, then it means you have code access on the new mailwizz endpoints, which means you can actually do whatever you wish, so you can easily, from the code, clone an existing delivery server and assign it to your customer, without the need to validate it anymore, smth along these lines
Code:
$server = DeliveryServer::model()->findByPk(1);
$newServer = clone $server;
$newServer->server_id = null;
$newServer->customer_id = 123;
$newServer->save(false);
And that it, now the server with id = 1 is cloned to your new customer. nothing else to do.
Same goes for the bounce and fbl servers.
 
Thanks for the feedback and direction. After cloning server with id=1 can I then programmatically update the details for the new cloned server without triggering a need to revalidate?

I am asking because most customers have their own unique servers on separate domains, etc.
 
Back
Top