How do I send a plain text email from the cron job?

I did create a cron job with custom sql query. I want something like if postal_code lower than 1. It will send an email notification to our support team. Can someone tell me what I can insert for this case to send out email?

    <?php
    namespace ABCCheckAddressCron;
    
    use PsrLogLoggerInterface;
    
    class Test {
        protected $logger;
    
        public function __construct(LoggerInterface $logger) {
            $this->logger = $logger;
        }
    
       /**
        * Write to system.log
        *
        * @return void
        */
        public function execute() {
            //$this->logger->info('Cron Works');
            
             $objectManager = MagentoFrameworkAppObjectManager::getInstance(); 
             $resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
             $connection = $resource->getConnection();
             $tableName = $resource->getTableName('sales_order_payment');
             $attribute_information = "SELECT sales_order_payment.additional_information FROM sales_order LEFT JOIN 
                sales_order_payment ON sales_order.entity_id = sales_order_payment.parent_id 
                WHERE sales_order_payment.method = 'ABCpayment' AND sales_order.updated_at >= NOW() - INTERVAL 1 MONTH";
            // fetchOne it return the one value
        //  $results = $connection->fetchOne($attribute_information);
            $results = $connection->fetchAll($attribute_information);
    
            $writer = new ZendLogWriterStream(BP . '/var/log/ABC.log');
            $logger = new ZendLogLogger();
            $logger->addWriter($writer);   
    
    
        foreach ($results as $result) {
            $json_array = implode($result);
                $data = json_decode($json_array); 
                $address_verification_json = $data->shipping_address_verification; 
                $data2 = json_decode($address_verification_json);
                $postal_code = $data2->postal_code;
            
            if ($postal_code < 1) {
                
                //$logger->info('postal_code LOWER THAN 1'); 
//SEND EMAIL TO CUSTOMER SERVICE    
                
            }
                //$logger->info('THIS IS LOWER THAN 1');  
           
                $logger->info('Flexiti');  
                $logger->info($result);  
                $logger->info($json_array);   
                $logger->info($address_verification);  
                $logger->info($postal_code);  
         
        }
    
    
    
    
            
    
        }
    }

log messages – User Import module’s “Send email” option is not reported in system log

When importing batches of users as .csv files, the module’s option “send email” appears to be working inconsistently. Some users receive the email, others don’t and can’t find it in Spam. Repeating the import doesn’t always solve the problem.

In addition to the mystery of this inconsistency, the email send-out by the module does not show up in the system log, whether successful or not. Therefore there is no way to verify if it was sent, except to depend on the user’s report of receiving or not receiving it. (Other kinds of email sends are recorded in the log; for example one that we set up in Rules.) Is there a solution for addressing this?

Can MySQL server send a “server started/running” signal to a remote server?

I have a MySQL 8 server on a virtual machine. I’d like to start it up when another server wants to communicate with it, and shut it down some time after there hasn’t been any connections or queries.

Right now I’m polling the VM to get it somewhat working, but there’s gotta be a better way.

I read the MySQL docs on handling Unix signals, but there isn’t a “startup” type signal.

I also read about MySQL events, but those seem to be limited to operations within the database like SQL queries.

Does MySQL have a way to push events to a remote server on startup, shutdown, error, etc.?

It’s probably possible to achieve in a script on the OS, and then send a curl request to the remote server with appropriate info, but MySQL’s a big software and I’m curious if this functionality is hidden somewhere in it.

wallet – Bitcoin-qt -testnet 0.17.1 Send and Receive buttons do nothing

Fully synced on testnet blockchain after building Bitcoin with UI and wallet enabled on Ubuntu 18.10.

Pressing Send and Receive buttons results in no UI displayed.

Receiving addresses dialog doesn’t have New button in this version so it can’t be used.

Debug window getnewaddress worked, however, and I was able to receive some coins from coinfaucet.eu using that address.

After receiving coins Send button still doesn’t result in any UI displayed.
Receiving addresses menu/resulting dialog now shows the address that coins were received at (the one obtained via getnewaddress).

I see the same behavior of buttons when synced on the main net but couldn’t test sending or receiving the real Bitcoins.

What can I do to debug this issue without getting deep into the (quite unfamiliar at this point) source code? I compiled bitcoin with optimizations enabled.

Here is a link to the debug.log created in the following way: exited bitcoin-qt and renamed original log which was huge. Restarted bitcoin-qt with options -testnet -debug=1. Clicked on Send, Receive and Transactions buttons. Exited bitcoin-qt.

whatsapp.app – ‘Send Photo via WhatsApp’ action not working in iPhone shortcuts

I am trying to create a shortcut on iPhone which will convert my photos from *.heic to *.jpeg and then send it on WhatsApp as a photo. Below is the screenshot of my shortcut.

enter image description here

But the shortcut does not work. It shows selection of Photos from my phone, but does not show up WhatsApp with photos to send to recipients. What am I missing here?

botframework – Bot Framework Composer send response to different conversation

I want to create a bot that manage conversation between clients and moderator.

I want to let the clients to ask the bot send a message to moderator to perform some action. After the moderator do it, I want to let the moderator to ask the bot to send a message back to the client that the operation is done.

Assume that I know the conversation id of the moderator and the client. How can I send a response to the moderator when a client need the moderator, and send a response to the client when the moderator do it?

Example chat flow:
Client    =>    Bot:      Give me the code
Bot        =>    Mod:    One of the clients need the code
Mod      =>    Bot:      12345
Bot       =>     Client:  The code is 12345

2010 – send email to a group of user using three state workflow

I’ve created a request form using a custom list. And I also have added a three-state workflow to send an email after a new item has been created in the list. For now, I can only send the email to the requester and also another one user. My problem is, I need to send the email to a group of users who is the administrator of the page.

I can’t use Sharepoint Designer or MS InfoPath due to permissions are not granted.

How can I do that? Is it possible?

sending – How to send bitcoin from an address created at Coinb.in?

Fortunately you have many options.

The bitcoin core client allows key import with importprivkey

Adds a private key to your wallet. Requires a new wallet backup.
Hint: use importmulti to import more than one private key.

Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls may report that the imported key exists but related transactions are still missing, leading to temporarily incorrect/bogus balances and unspent outputs until rescan completes.

Arguments:

  1. privkey (string, required) The private key (see dumpprivkey)
  2. label (string, optional, default=current label if address exists, otherwise “”) An optional label
  3. rescan (boolean, optional, default=true) Rescan the wallet for transactions

Alternatively there are many wallets out there that allow importing or sweeping a private key. Some of these include Electrum, Mycelium and Samourai (these are examples, not recommendations).

Lastly, coinb.in, the site you used to create the key allows you to build a transaction and sign it as well https://coinb.in/#newTransaction. I wouldn’t recommend this for a novice user as you can end up losing your funds to miners fees if you do not include a change address. If you don’t know what a change address is don’t attempt this approach. You can practice on testnet or with small amounts until you get comfortable you know what you are doing.

ssh – how to log into a machine with Putty and send specific commands

Im trying to automate some work to save some time. I need to use Putty to SSH into a machine and come up with a scripts that send commands. In this situation I need to send the “battery” and hit enter. I originally thought of a .bat file that has “start C:Putty.exe user@IP -pw password -m script.txt” this logs into the machine and opens the shell but my script.txt doesn’t send the command battery. I’m not sure what that scrypt.txt needs to make it work?

Any thoughts on how I can make this work?