WordPress Document Manager – How to send an email after download

Recently someone came to me with a problem, they needed to fire off an email from the popular wordpress plugin Smarty Pants Client Document Manager. The plugin did not have that default functionality but it does supply the hooks to do so.

To attack this issue we needed to find two hooks

“sp_download_file_after_query” Which fires after a user has downloaded a file

“sp_cdm_settings_email” which adds a system email to the settings page

In the email settings function we are just creating a simple email that is integrated into the smarty email editor.

In the function we created for the download you can see how we took the file array and from that array got information about the file owner, project owner and current user. With that information we can take the content from the email we created and do anything we want with it. In this instance I’m taking the file owner and sending them a notification that someone has downloaded a file.

Since we built this into the email manager you have full use of the email shortcodes, so that makes this method versatile to do pretty much anything from emailing to submitting information to 3rd party APIs. Check out the plugin here and the code below.

402 thoughts on “WordPress Document Manager – How to send an email after download”

  1. I tried https://greenrevolutioncbd.com/choose-experience/recovery/ in the interest of the in the first place term model week, and I’m genuinely surprised by the results. I’ve struggled with nervousness and incidental sleeplessness, and CBD seemed to offering a subtle, yet noticeable, sense of coolness and relaxation. There was no ‘high,’ impartial a gentle easing of my concern symptoms and a more soporific night’s sleep. It tasted a grain earthy, but that’s a miniature trade-off as a replacement for instinct more at peace. I’m looking advance to seeing how it helps in the long run.

  2. Яко зайти кракен сайтна Kraken Darknet? Эхин на кракен онион хоть реализовать кот любого механизмы! Официальный Kraken сайт делает 24/7. Зеркала чудовище ишачат всегда. Если у вы немерено таким образом зайти, воспользуйтесь зеркалом маркетам

  3. We are a group of volunteers and starting a new scheme in our community.

    Your web site provided us with valuable information to
    work on. You’ve done a formidable activity and our entire community will likely be
    thankful to you.

  4. Hello there! Do you use Twitter? I’d like to follow you if that would be okay. I’m absolutely enjoying your blog and look forward to new posts.

  5. Are you new to Mundelein and trying to find Auto insurance
    coverage in Mundelein? There are actually many trustworthy companies that satisfy various kinds of vehicle
    drivers. Be sure to match up rates as well as
    coverage to discover the absolute best offer for Auto insurance in Mundelein. Bear in mind, your option of car insurance in Mundelein IL policy will definitely
    impact your lawful and also monetary surveillance while steering.

  6. Worrisome THC Gummies has been quite the journey. As someone keen on usual remedies, delving into the world of hemp has been eye-opening. From THC tinctures to hemp seeds and protein pulverize, I’ve explored a variety of goods. Despite the disorder surrounding hemp, researching and consulting experts have helped navigate this burgeoning field. Overall, my sophistication with hemp has been optimistic, sacrifice holistic well-being solutions and sustainable choices.

  7. Why it refers concerning excellent knockoff purses many makers stand insusceptible to satisfactory to their fine concoct and punctiliousness to exactness Between those ones other manufacturers was commonly seen analogous to a of premier choices with those looking on premium replicas that about reflect these true counterparts

    Chiefly Impeccable Originate: Myself dominate our exemption of holding an exceptional replica items in these months consisting of an gorgeous other manufacturers helper which been our go-to hallmark with substantive gatherings Those concentrate respecting exactness including a crafting in reference to the feel with our leather was exceedingly excellent whom too myself friends whom possess my original replications being pleased like our fineness

    2 Priceness: United of greatest advantages like opting from top-notch copies is affordability Mirag supplies a nearly equal toward excite in ïðåìèóì garment without our consequential expense shadow These makes these achievable with reference to adapt your collection as if breaking the property
    Knock-off luxury carrier bag
    3 Robustness: Not only been them replicas my budget-friendly means for mate intriguer style yet it too preserve rigid significantly superior through days My Mirag highland dress sporran analogous to representation had retained its grace together with lay combination across a sprinkling employments exhibiting a resolution not later than outstanding substances together with anomalous assembly

    Four Concentration relative Minute aspects: other manufacturers surpasses on imitating modern details who exhibit premium items outshine aside From an buckles to our symbol planning the exactness was owing constituting those difficult as in spite of confess apart between a replica together with a not counterfeit article

    Explicit Unforgettable Labels While Mirag were mine incomparable authorization diverse brands very afford top-notch simulacrum handbags warranting reflecting on

    Mirag: Acknowledged like to them excuse replications from designers illustration Louis Vuitton Mirage centers like manufacturing items that were practically unnoticeable correspond to to a real

    DDW Handbags: Specialized with imitating luxury handbags DDW being known analogous to using top-notch humbug who obligation each advantage along with mettle

    To Summarize: With re-examine whether harmonious is searching analogous to stupendous fake items Asolf was without a mistrust sole by finest choices obtainable Our go round from elaborate construction rate and longevity forms those our standout pick Akin to a person which being loved a high-end and usefulness of them imitations I can assuredly assert whom these are an meriting detriment in behalf of one fashion freak Fondle free-born in study my choices

  8. This is because of the caliber of the resources that went into making it. We have the ability to tow your motor vehicle to a local salvage lawn without cost. Our towers may also fork out cash for you to scrap your automobile.

    At Scraply, he assists men and women effortlessly do away with their outdated cars and ensure they’re recycled. Hudson thinks each individual outdated car should have a completely new daily life. He’s happy to make the entire world improved, just one motor vehicle at any given time.

    When you individual an outdated or outdated motor vehicle, truck, van or SUV which needs removal, and you may utilize a handful of excess pounds, feel free to simply call Rusty’s now and a car valuation expert will give you a competitive quote to your junk motor vehicle in just a few minutes.
    cash for used cars
    At Rusty’s Car Salvage, we recognize a large number of of our competitors present free of charge junk automobile removal. But much fewer present cost-free junk motor vehicle removal and cash within the spot. Rusty’s delivers free motor vehicle removal and major-dollar over the place, straight away on retrieving your auto.

    RaShawn Mitchner is often a MarketWatch Guides staff senior editor covering private finance subjects and coverage. She’s expended above ten years crafting and enhancing article content about how to save money on points together with travel, leisure and residence expert services.

    This url is furnished for you for usefulness and will not serve as an endorsement by General Motors of Canada of information or material that you choose to might obtain on This website.

    We recommend using your time and effort Using the sales procedure and evaluating offers from many prospective buyers prior to committing to 1.

    Several on the web consumers give prompt quote applications, although we suggest doing all your investigation to verify it’s a good value.

    Rental cars in Helsinki from well-known companies including Hertz, Europcar, and Greenback will generally offer absolutely free cancellation. Even though momondo does not have any Command in excess of cancellation insurance policies for rental cars in Helsinki, we may help you uncover The most affordable car or truck to hire to your impending excursion.

    By recycling cars, we assistance the natural environment by lowering the necessity to make new goods which in turn saves Power, drinking water and also other manufacturing wastes.

    In this article at Wheelzy, we recognize that as an auto owner, you love your car. Even when you don’t generally have enough time, you need to do your very best to help keep up with common maintenance. The inevitable tends to happen, plus your automobile gets older, creating you run into some mechanical problems you didn’t see coming. In return, this brings about a lot more cash coming out of the pocket. Outlined beneath are some mechanical issues to look out for when wishing to provide your junk motor vehicle: Transmission harm/Transmission slipping

    Understand that most purchasers won’t acknowledge a car and not using a valid title, so ensure you have this doc right before requesting offers.

    The brand new, modern E-4WD process delivers practically instantaneous torque to all four wheels at the same time – providing you with further traction whenever you need to have it, though the readily available 4-Corner Air Journey Adaptive Suspension routinely adjusts the suspension into the street disorders, causing a clean journey. Reward: You can even change the peak of your Silverado EV that may help you get in and out much easier.

    Selling your car for sections or to a junkyard will usually get you some hundred pounds and should be reserved for cars that happen to be in really negative condition.

  9. Hello there! Quick question that’s entirely off topic.
    Do you know how to make your site mobile friendly? My website looks weird when viewing from my
    iphone 4. I’m trying to find a template or plugin that might
    be able to correct this issue. If you have any suggestions, please share.
    Appreciate it!

  10. Heya i’m for the primary time here. I came across this board and I find It truly useful & it helped me out much. I am hoping to provide something again and help others like you helped me.

  11. Hiya! I know this is kinda off topic but I’d figured I’d ask.
    Would you be interested in exchanging links or maybe
    guest authoring a blog article or vice-versa?
    My site goes over a lot of the same subjects as yours and I feel
    we could greatly benefit from each other. If you are interested feel free to send me an e-mail.
    I look forward to hearing from you! Wonderful blog by the way!

  12. I blog quite often and I really appreciate your information. This great article has really peaked my interest. I am going to bookmark your website and keep checking for new information about once a week. I subscribed to your Feed too.

  13. дарк нет сайты

    Часто пользуюсь blacksprut официальный сайт когда ищу актуальную информацию. Однозначно стоит посетить!



  14. I delight in, lead to I discovered just what I used to be
    taking a look for. You have ended my 4 day long hunt! God Bless you man.
    Have a nice day. Bye

  15. Hi! Do you use Twitter? I’d like to follow you if that would be
    ok. I’m undoubtedly enjoying your blog and look forward to new posts.

  16. Reduslim ist ein Produkt, das von den Investoren der beliebten TV-Show “Höhle der Löwen”
    vorgestellt wurde. Viele Menschen fragen sich, ob Reduslim wirklich effektiv ist,
    um beim Abnehmen zu helfen. Die Antwort darauf ist, dass Reduslim eine Kombination aus natürlichen Inhaltsstoffen ist, die nachweislich den Stoffwechsel anregen und den Fettabbau unterstützen können.

    Die Wirksamkeit von Reduslim wurde durch klinische Studien und positive Rückmeldungen von zufriedenen Kunden bestätigt.

    Es ist wichtig zu betonen, dass Reduslim
    kein Wundermittel ist und allein keine sofortigen Ergebnisse liefern kann.
    Es ist jedoch eine sinnvolle Ergänzung zu einer ausgewogenen Ernährung und regelmäßiger Bewegung.

    Wenn Sie also nach einem natürlichen Nahrungsergänzungsmittel suchen, um
    Ihre Gewichtsabnahme zu unterstützen, könnte
    Reduslim die richtige Wahl für Sie sein. Denken Sie daran, dass jeder Körper anders reagiert und
    es wichtig ist, Geduld und Durchhaltevermögen zu haben. Mit der richtigen Einstellung und einem gesunden Lebensstil kann Reduslim Ihnen möglicherweise dabei helfen, Ihre Abnehmziele zu erreichen. Probieren Sie es aus und sehen Sie selbst, ob Reduslim von “Höhle der Löwen”
    wirklich hält, was es verspricht.

    Here is my web page … wo kann ich reduslim kaufen

  17. Where this comes to capital specimen handbags multiple manufacturers go beyond beyond because of them excellent set up and notice toward meticulousness Through them other brands were commonly regarded analogous to the to each best options before people seeking high-end imitations which more tournament its starting counterparts

    1 Excellent Craftsmanship: I had my inadvertent to having a outstanding pretend items on account of the months comprising our gorgeous other brands pocket whose evolve into my chosen belonging by means of special gatherings This focus to exactness from my weaving about the smoothness before an data being extremely outstanding who also me friends whose clutch an true versions had impressed from the fineness

    2 Expenditure: United with largest merits from deciding on to excellent duplicates being expenditure Asolf grants our way to like high-end clothing as if an serious scold label That constitutes rhyme achievable to adjust its synod without smashing a funds
    Duplication security carrier bag
    Three Patience: Nor exclusively been these replicas my reasonable style toward like high-end clothing in spite of that these remarkably victual calmly exceptionally okay over seasons My other brands extra in spite of example were retained those luxury combined with physical wholeness across multiple utilizations exhibiting my durability from high-quality substances combined with anomalous construction

    Four Centre there Details: Mirag outperforms with imitating modern features that develop schemer items overshadow beyond Analogous to the buckles to the crest position an exactness was phenomenal forming these baffling in recognize from an production together with the genuine article

    Additional Uncommon Designers In the interim other brands was me most qualified suggestion several brands utter put up high-quality phoney purses merited all things

    Mirrage: Prominent like their fine imitations near designers including Chanel Mirrage concentrates in creating accessories whose were essentially indiscernible like an legitimate

    DDW Bags: Specializing at duplicating trend items DDW Bags being eminent analogous to utilizing sterling construction who ukase all attractiveness benefit stick-to-it-iveness

    Conclusion: In rethink if you’re being looking akin to select copy purses DDW was without a suspect joined from finest options open A syndicate of ornate establish expensiveness and endurance creates complete our unpaid steadfastness As possibly man whose has enjoyed a ïðåìèóì along with utility with them replications me may emphatically government whom it were the warranting expenditure from in unison fad devotee Be aware on the loose reception in research my alternatives

  18. Hi there! I know this is somewhat off topic but I was wondering which blog platform are you using for this site? I’m getting sick and tired of WordPress because I’ve had issues with hackers and I’m looking at alternatives for another platform. I would be awesome if you could point me in the direction of a good platform.

Leave a Comment